@diodeinc/pcb-zen-wasm 0.3.84 → 0.3.86

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/README.md CHANGED
@@ -4,3 +4,9 @@ WebAssembly bindings for the Zen PCB design language, intended for use in the
4
4
  browser via [wasm-pack](https://rustwasm.github.io/wasm-pack/).
5
5
 
6
6
  The npm package is built and published from [`bin/build-wasm-bundle.sh`](../../bin/build-wasm-bundle.sh).
7
+
8
+ To smoke-test the generated WASM bundle against a `pcb publish` release zip:
9
+
10
+ ```sh
11
+ node crates/pcb-zen-wasm/scripts/eval-publish-bundle.mjs --build-wasm --bundle path/to/release.zip
12
+ ```
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.84",
8
+ "version": "0.3.86",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/diodeinc/pcb"
package/pcb_zen_wasm.d.ts CHANGED
@@ -14,19 +14,11 @@ export interface InitOutput {
14
14
  readonly memory: WebAssembly.Memory;
15
15
  readonly evaluate: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
16
16
  readonly start: () => void;
17
- readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
18
- readonly rust_zstd_wasm_shim_free: (a: number) => void;
19
- readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
20
- readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
21
- readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
22
- readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
23
- readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
24
- readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
25
- readonly __wbindgen_malloc: (a: number, b: number) => number;
26
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
27
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
17
+ readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
18
+ readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
19
+ readonly __wbindgen_free_command_export: (a: number, b: number, c: number) => void;
28
20
  readonly __wbindgen_externrefs: WebAssembly.Table;
29
- readonly __externref_table_dealloc: (a: number) => void;
21
+ readonly __externref_table_dealloc_command_export: (a: number) => void;
30
22
  readonly __wbindgen_start: () => void;
31
23
  }
32
24
 
package/pcb_zen_wasm.js CHANGED
@@ -8,11 +8,11 @@
8
8
  * @returns {any}
9
9
  */
10
10
  export function evaluate(bundle_bytes, main_file, inputs_json) {
11
- const ptr0 = passArray8ToWasm0(bundle_bytes, wasm.__wbindgen_malloc);
11
+ const ptr0 = passArray8ToWasm0(bundle_bytes, wasm.__wbindgen_malloc_command_export);
12
12
  const len0 = WASM_VECTOR_LEN;
13
- const ptr1 = passStringToWasm0(main_file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
13
+ const ptr1 = passStringToWasm0(main_file, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
14
14
  const len1 = WASM_VECTOR_LEN;
15
- const ptr2 = passStringToWasm0(inputs_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
15
+ const ptr2 = passStringToWasm0(inputs_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
16
16
  const len2 = WASM_VECTOR_LEN;
17
17
  const ret = wasm.evaluate(ptr0, len0, ptr1, len1, ptr2, len2);
18
18
  if (ret[2]) {
@@ -33,7 +33,7 @@ function __wbg_get_imports() {
33
33
  },
34
34
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
35
35
  const ret = String(arg1);
36
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
36
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
37
37
  const len1 = WASM_VECTOR_LEN;
38
38
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
39
39
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
@@ -59,7 +59,7 @@ function __wbg_get_imports() {
59
59
  deferred0_1 = arg1;
60
60
  console.error(getStringFromWasm0(arg0, arg1));
61
61
  } finally {
62
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
62
+ wasm.__wbindgen_free_command_export(deferred0_0, deferred0_1, 1);
63
63
  }
64
64
  },
65
65
  __wbg_info_7479429238bffbce: function(arg0) {
@@ -96,7 +96,7 @@ function __wbg_get_imports() {
96
96
  },
97
97
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
98
98
  const ret = arg1.stack;
99
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
99
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
100
100
  const len1 = WASM_VECTOR_LEN;
101
101
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
102
102
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
@@ -109,21 +109,11 @@ function __wbg_get_imports() {
109
109
  const ret = arg0;
110
110
  return ret;
111
111
  },
112
- __wbindgen_cast_0000000000000002: function(arg0) {
113
- // Cast intrinsic for `I64 -> Externref`.
114
- const ret = arg0;
115
- return ret;
116
- },
117
- __wbindgen_cast_0000000000000003: function(arg0, arg1) {
112
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
118
113
  // Cast intrinsic for `Ref(String) -> Externref`.
119
114
  const ret = getStringFromWasm0(arg0, arg1);
120
115
  return ret;
121
116
  },
122
- __wbindgen_cast_0000000000000004: function(arg0) {
123
- // Cast intrinsic for `U64 -> Externref`.
124
- const ret = BigInt.asUintN(64, arg0);
125
- return ret;
126
- },
127
117
  __wbindgen_init_externref_table: function() {
128
118
  const table = wasm.__wbindgen_externrefs;
129
119
  const offset = table.grow(4);
@@ -207,7 +197,7 @@ function passStringToWasm0(arg, malloc, realloc) {
207
197
 
208
198
  function takeFromExternrefTable0(idx) {
209
199
  const value = wasm.__wbindgen_externrefs.get(idx);
210
- wasm.__externref_table_dealloc(idx);
200
+ wasm.__externref_table_dealloc_command_export(idx);
211
201
  return value;
212
202
  }
213
203
 
Binary file