@diodeinc/pcb-zen-wasm 0.3.54 → 0.3.56
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 +1 -1
- package/pcb_zen_wasm.d.ts +3 -5
- package/pcb_zen_wasm.js +8 -10
- package/pcb_zen_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/pcb_zen_wasm.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export function start(): void;
|
|
3
4
|
/**
|
|
4
|
-
* Evaluate a Zener module from
|
|
5
|
-
*
|
|
6
|
-
* This is a thin wrapper around `evaluate_impl` for wasm-bindgen.
|
|
5
|
+
* Evaluate a Zener module from an in-memory source bundle (WASM binding).
|
|
7
6
|
*/
|
|
8
|
-
export function evaluate(
|
|
9
|
-
export function start(): void;
|
|
7
|
+
export function evaluate(bundle_bytes: Uint8Array, main_file: string, inputs_json: string): any;
|
|
10
8
|
|
|
11
9
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
12
10
|
|
package/pcb_zen_wasm.js
CHANGED
|
@@ -83,6 +83,10 @@ 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
|
+
|
|
86
90
|
function passArray8ToWasm0(arg, malloc) {
|
|
87
91
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
88
92
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -96,16 +100,14 @@ function takeFromExternrefTable0(idx) {
|
|
|
96
100
|
return value;
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
|
-
* Evaluate a Zener module from
|
|
100
|
-
*
|
|
101
|
-
* This is a thin wrapper around `evaluate_impl` for wasm-bindgen.
|
|
102
|
-
* @param {Uint8Array} zip_bytes
|
|
103
|
+
* Evaluate a Zener module from an in-memory source bundle (WASM binding).
|
|
104
|
+
* @param {Uint8Array} bundle_bytes
|
|
103
105
|
* @param {string} main_file
|
|
104
106
|
* @param {string} inputs_json
|
|
105
107
|
* @returns {any}
|
|
106
108
|
*/
|
|
107
|
-
export function evaluate(
|
|
108
|
-
const ptr0 = passArray8ToWasm0(
|
|
109
|
+
export function evaluate(bundle_bytes, main_file, inputs_json) {
|
|
110
|
+
const ptr0 = passArray8ToWasm0(bundle_bytes, wasm.__wbindgen_malloc);
|
|
109
111
|
const len0 = WASM_VECTOR_LEN;
|
|
110
112
|
const ptr1 = passStringToWasm0(main_file, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
113
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -118,10 +120,6 @@ export function evaluate(zip_bytes, main_file, inputs_json) {
|
|
|
118
120
|
return takeFromExternrefTable0(ret[0]);
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
export function start() {
|
|
122
|
-
wasm.start();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
123
|
async function __wbg_load(module, imports) {
|
|
126
124
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
127
125
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
package/pcb_zen_wasm_bg.wasm
CHANGED
|
Binary file
|