@diodeinc/pcb-zen-wasm 0.3.53 → 0.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Diode Computers, Inc. <founders@diode.computer>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Zen PCB design language",
8
- "version": "0.3.53",
8
+ "version": "0.3.55",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/diodeinc/pcb"
package/pcb_zen_wasm.d.ts CHANGED
@@ -1,12 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function start(): void;
4
3
  /**
5
- * Evaluate a Zener module from a zip archive (WASM binding).
6
- *
7
- * This is a thin wrapper around `evaluate_impl` for wasm-bindgen.
4
+ * Evaluate a Zener module from an in-memory source bundle (WASM binding).
8
5
  */
9
- export function evaluate(zip_bytes: Uint8Array, main_file: string, inputs_json: string): any;
6
+ export function evaluate(bundle_bytes: Uint8Array, main_file: string, inputs_json: string): any;
7
+ export function start(): void;
10
8
 
11
9
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
12
10
 
package/pcb_zen_wasm.js CHANGED
@@ -83,10 +83,6 @@ function getStringFromWasm0(ptr, len) {
83
83
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
84
84
  }
85
85
 
86
- export function start() {
87
- wasm.start();
88
- }
89
-
90
86
  function passArray8ToWasm0(arg, malloc) {
91
87
  const ptr = malloc(arg.length * 1, 1) >>> 0;
92
88
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -100,16 +96,14 @@ function takeFromExternrefTable0(idx) {
100
96
  return value;
101
97
  }
102
98
  /**
103
- * Evaluate a Zener module from a zip archive (WASM binding).
104
- *
105
- * This is a thin wrapper around `evaluate_impl` for wasm-bindgen.
106
- * @param {Uint8Array} zip_bytes
99
+ * Evaluate a Zener module from an in-memory source bundle (WASM binding).
100
+ * @param {Uint8Array} bundle_bytes
107
101
  * @param {string} main_file
108
102
  * @param {string} inputs_json
109
103
  * @returns {any}
110
104
  */
111
- export function evaluate(zip_bytes, main_file, inputs_json) {
112
- const ptr0 = passArray8ToWasm0(zip_bytes, wasm.__wbindgen_malloc);
105
+ export function evaluate(bundle_bytes, main_file, inputs_json) {
106
+ const ptr0 = passArray8ToWasm0(bundle_bytes, wasm.__wbindgen_malloc);
113
107
  const len0 = WASM_VECTOR_LEN;
114
108
  const ptr1 = passStringToWasm0(main_file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
115
109
  const len1 = WASM_VECTOR_LEN;
@@ -122,6 +116,10 @@ export function evaluate(zip_bytes, main_file, inputs_json) {
122
116
  return takeFromExternrefTable0(ret[0]);
123
117
  }
124
118
 
119
+ export function start() {
120
+ wasm.start();
121
+ }
122
+
125
123
  async function __wbg_load(module, imports) {
126
124
  if (typeof Response === 'function' && module instanceof Response) {
127
125
  if (typeof WebAssembly.instantiateStreaming === 'function') {
Binary file