@raviqqe/stak 0.12.34 → 0.12.36

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
@@ -29,6 +29,12 @@ cargo install stak
29
29
  cargo install stak-repl
30
30
  ```
31
31
 
32
+ To install the interpreter as a smaller executable based on libc on Unix, run:
33
+
34
+ ```sh
35
+ cargo install stak --no-default-features --features float,libc
36
+ ```
37
+
32
38
  To install [the minimal interpreter](https://crates.io/crates/mstak), run:
33
39
 
34
40
  ```sh
package/compile.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Compiles source codes in Scheme.
5
+ */
6
+ export function compile(source: string): Uint8Array;
7
+
8
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
9
+
10
+ export interface InitOutput {
11
+ readonly memory: WebAssembly.Memory;
12
+ readonly compile: (a: number, b: number) => [number, number, number, number];
13
+ readonly __wbindgen_externrefs: WebAssembly.Table;
14
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
15
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
16
+ readonly __externref_table_dealloc: (a: number) => void;
17
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
18
+ readonly __wbindgen_start: () => void;
19
+ }
20
+
21
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
22
+ /**
23
+ * Instantiates the given `module`, which can either be bytes or
24
+ * a precompiled `WebAssembly.Module`.
25
+ *
26
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
27
+ *
28
+ * @returns {InitOutput}
29
+ */
30
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
31
+
32
+ /**
33
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
34
+ * for everything else, calls `WebAssembly.instantiate` directly.
35
+ *
36
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
37
+ *
38
+ * @returns {Promise<InitOutput>}
39
+ */
40
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/compile.js ADDED
@@ -0,0 +1,233 @@
1
+ let wasm;
2
+
3
+ let cachedUint8ArrayMemory0 = null;
4
+
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
+ }
11
+
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
+
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ let WASM_VECTOR_LEN = 0;
34
+
35
+ const cachedTextEncoder = new TextEncoder();
36
+
37
+ if (!('encodeInto' in cachedTextEncoder)) {
38
+ cachedTextEncoder.encodeInto = function (arg, view) {
39
+ const buf = cachedTextEncoder.encode(arg);
40
+ view.set(buf);
41
+ return {
42
+ read: arg.length,
43
+ written: buf.length
44
+ };
45
+ }
46
+ }
47
+
48
+ function passStringToWasm0(arg, malloc, realloc) {
49
+
50
+ if (realloc === undefined) {
51
+ const buf = cachedTextEncoder.encode(arg);
52
+ const ptr = malloc(buf.length, 1) >>> 0;
53
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
+ WASM_VECTOR_LEN = buf.length;
55
+ return ptr;
56
+ }
57
+
58
+ let len = arg.length;
59
+ let ptr = malloc(len, 1) >>> 0;
60
+
61
+ const mem = getUint8ArrayMemory0();
62
+
63
+ let offset = 0;
64
+
65
+ for (; offset < len; offset++) {
66
+ const code = arg.charCodeAt(offset);
67
+ if (code > 0x7F) break;
68
+ mem[ptr + offset] = code;
69
+ }
70
+
71
+ if (offset !== len) {
72
+ if (offset !== 0) {
73
+ arg = arg.slice(offset);
74
+ }
75
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
+ const ret = cachedTextEncoder.encodeInto(arg, view);
78
+
79
+ offset += ret.written;
80
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
81
+ }
82
+
83
+ WASM_VECTOR_LEN = offset;
84
+ return ptr;
85
+ }
86
+
87
+ function takeFromExternrefTable0(idx) {
88
+ const value = wasm.__wbindgen_externrefs.get(idx);
89
+ wasm.__externref_table_dealloc(idx);
90
+ return value;
91
+ }
92
+
93
+ function getArrayU8FromWasm0(ptr, len) {
94
+ ptr = ptr >>> 0;
95
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
96
+ }
97
+ /**
98
+ * Compiles source codes in Scheme.
99
+ * @param {string} source
100
+ * @returns {Uint8Array}
101
+ */
102
+ export function compile(source) {
103
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
104
+ const len0 = WASM_VECTOR_LEN;
105
+ const ret = wasm.compile(ptr0, len0);
106
+ if (ret[3]) {
107
+ throw takeFromExternrefTable0(ret[2]);
108
+ }
109
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
110
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
111
+ return v2;
112
+ }
113
+
114
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
115
+
116
+ async function __wbg_load(module, imports) {
117
+ if (typeof Response === 'function' && module instanceof Response) {
118
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
119
+ try {
120
+ return await WebAssembly.instantiateStreaming(module, imports);
121
+
122
+ } catch (e) {
123
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
124
+
125
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
126
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
127
+
128
+ } else {
129
+ throw e;
130
+ }
131
+ }
132
+ }
133
+
134
+ const bytes = await module.arrayBuffer();
135
+ return await WebAssembly.instantiate(bytes, imports);
136
+
137
+ } else {
138
+ const instance = await WebAssembly.instantiate(module, imports);
139
+
140
+ if (instance instanceof WebAssembly.Instance) {
141
+ return { instance, module };
142
+
143
+ } else {
144
+ return instance;
145
+ }
146
+ }
147
+ }
148
+
149
+ function __wbg_get_imports() {
150
+ const imports = {};
151
+ imports.wbg = {};
152
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
153
+ const ret = Error(getStringFromWasm0(arg0, arg1));
154
+ return ret;
155
+ };
156
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
157
+ throw new Error(getStringFromWasm0(arg0, arg1));
158
+ };
159
+ imports.wbg.__wbindgen_init_externref_table = function() {
160
+ const table = wasm.__wbindgen_externrefs;
161
+ const offset = table.grow(4);
162
+ table.set(0, undefined);
163
+ table.set(offset + 0, undefined);
164
+ table.set(offset + 1, null);
165
+ table.set(offset + 2, true);
166
+ table.set(offset + 3, false);
167
+ ;
168
+ };
169
+
170
+ return imports;
171
+ }
172
+
173
+ function __wbg_finalize_init(instance, module) {
174
+ wasm = instance.exports;
175
+ __wbg_init.__wbindgen_wasm_module = module;
176
+ cachedUint8ArrayMemory0 = null;
177
+
178
+
179
+ wasm.__wbindgen_start();
180
+ return wasm;
181
+ }
182
+
183
+ function initSync(module) {
184
+ if (wasm !== undefined) return wasm;
185
+
186
+
187
+ if (typeof module !== 'undefined') {
188
+ if (Object.getPrototypeOf(module) === Object.prototype) {
189
+ ({module} = module)
190
+ } else {
191
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
192
+ }
193
+ }
194
+
195
+ const imports = __wbg_get_imports();
196
+
197
+ if (!(module instanceof WebAssembly.Module)) {
198
+ module = new WebAssembly.Module(module);
199
+ }
200
+
201
+ const instance = new WebAssembly.Instance(module, imports);
202
+
203
+ return __wbg_finalize_init(instance, module);
204
+ }
205
+
206
+ async function __wbg_init(module_or_path) {
207
+ if (wasm !== undefined) return wasm;
208
+
209
+
210
+ if (typeof module_or_path !== 'undefined') {
211
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
212
+ ({module_or_path} = module_or_path)
213
+ } else {
214
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
215
+ }
216
+ }
217
+
218
+ if (typeof module_or_path === 'undefined') {
219
+ module_or_path = new URL('compile_bg.wasm', import.meta.url);
220
+ }
221
+ const imports = __wbg_get_imports();
222
+
223
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
224
+ module_or_path = fetch(module_or_path);
225
+ }
226
+
227
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
228
+
229
+ return __wbg_finalize_init(instance, module);
230
+ }
231
+
232
+ export { initSync };
233
+ export default __wbg_init;
Binary file
package/interpret.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Interprets bytecode with standard input and returns its standard output.
5
+ */
6
+ export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
7
+
8
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
9
+
10
+ export interface InitOutput {
11
+ readonly memory: WebAssembly.Memory;
12
+ readonly interpret: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
13
+ readonly __wbindgen_externrefs: WebAssembly.Table;
14
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
15
+ readonly __externref_table_dealloc: (a: number) => void;
16
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
17
+ readonly __wbindgen_start: () => void;
18
+ }
19
+
20
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
21
+ /**
22
+ * Instantiates the given `module`, which can either be bytes or
23
+ * a precompiled `WebAssembly.Module`.
24
+ *
25
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
26
+ *
27
+ * @returns {InitOutput}
28
+ */
29
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
30
+
31
+ /**
32
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
33
+ * for everything else, calls `WebAssembly.instantiate` directly.
34
+ *
35
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
36
+ *
37
+ * @returns {Promise<InitOutput>}
38
+ */
39
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/interpret.js ADDED
@@ -0,0 +1,192 @@
1
+ let wasm;
2
+
3
+ let cachedUint8ArrayMemory0 = null;
4
+
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
+ }
11
+
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
+
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ let WASM_VECTOR_LEN = 0;
34
+
35
+ function passArray8ToWasm0(arg, malloc) {
36
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
37
+ getUint8ArrayMemory0().set(arg, ptr / 1);
38
+ WASM_VECTOR_LEN = arg.length;
39
+ return ptr;
40
+ }
41
+
42
+ function takeFromExternrefTable0(idx) {
43
+ const value = wasm.__wbindgen_externrefs.get(idx);
44
+ wasm.__externref_table_dealloc(idx);
45
+ return value;
46
+ }
47
+
48
+ function getArrayU8FromWasm0(ptr, len) {
49
+ ptr = ptr >>> 0;
50
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
51
+ }
52
+ /**
53
+ * Interprets bytecode with standard input and returns its standard output.
54
+ * @param {Uint8Array} bytecode
55
+ * @param {Uint8Array} input
56
+ * @param {number} heap_size
57
+ * @returns {Uint8Array}
58
+ */
59
+ export function interpret(bytecode, input, heap_size) {
60
+ const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
61
+ const len0 = WASM_VECTOR_LEN;
62
+ const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
63
+ const len1 = WASM_VECTOR_LEN;
64
+ const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
65
+ if (ret[3]) {
66
+ throw takeFromExternrefTable0(ret[2]);
67
+ }
68
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
69
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
70
+ return v3;
71
+ }
72
+
73
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
74
+
75
+ async function __wbg_load(module, imports) {
76
+ if (typeof Response === 'function' && module instanceof Response) {
77
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
78
+ try {
79
+ return await WebAssembly.instantiateStreaming(module, imports);
80
+
81
+ } catch (e) {
82
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
83
+
84
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
85
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
86
+
87
+ } else {
88
+ throw e;
89
+ }
90
+ }
91
+ }
92
+
93
+ const bytes = await module.arrayBuffer();
94
+ return await WebAssembly.instantiate(bytes, imports);
95
+
96
+ } else {
97
+ const instance = await WebAssembly.instantiate(module, imports);
98
+
99
+ if (instance instanceof WebAssembly.Instance) {
100
+ return { instance, module };
101
+
102
+ } else {
103
+ return instance;
104
+ }
105
+ }
106
+ }
107
+
108
+ function __wbg_get_imports() {
109
+ const imports = {};
110
+ imports.wbg = {};
111
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
112
+ const ret = Error(getStringFromWasm0(arg0, arg1));
113
+ return ret;
114
+ };
115
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
116
+ throw new Error(getStringFromWasm0(arg0, arg1));
117
+ };
118
+ imports.wbg.__wbindgen_init_externref_table = function() {
119
+ const table = wasm.__wbindgen_externrefs;
120
+ const offset = table.grow(4);
121
+ table.set(0, undefined);
122
+ table.set(offset + 0, undefined);
123
+ table.set(offset + 1, null);
124
+ table.set(offset + 2, true);
125
+ table.set(offset + 3, false);
126
+ ;
127
+ };
128
+
129
+ return imports;
130
+ }
131
+
132
+ function __wbg_finalize_init(instance, module) {
133
+ wasm = instance.exports;
134
+ __wbg_init.__wbindgen_wasm_module = module;
135
+ cachedUint8ArrayMemory0 = null;
136
+
137
+
138
+ wasm.__wbindgen_start();
139
+ return wasm;
140
+ }
141
+
142
+ function initSync(module) {
143
+ if (wasm !== undefined) return wasm;
144
+
145
+
146
+ if (typeof module !== 'undefined') {
147
+ if (Object.getPrototypeOf(module) === Object.prototype) {
148
+ ({module} = module)
149
+ } else {
150
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
151
+ }
152
+ }
153
+
154
+ const imports = __wbg_get_imports();
155
+
156
+ if (!(module instanceof WebAssembly.Module)) {
157
+ module = new WebAssembly.Module(module);
158
+ }
159
+
160
+ const instance = new WebAssembly.Instance(module, imports);
161
+
162
+ return __wbg_finalize_init(instance, module);
163
+ }
164
+
165
+ async function __wbg_init(module_or_path) {
166
+ if (wasm !== undefined) return wasm;
167
+
168
+
169
+ if (typeof module_or_path !== 'undefined') {
170
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
171
+ ({module_or_path} = module_or_path)
172
+ } else {
173
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
174
+ }
175
+ }
176
+
177
+ if (typeof module_or_path === 'undefined') {
178
+ module_or_path = new URL('interpret_bg.wasm', import.meta.url);
179
+ }
180
+ const imports = __wbg_get_imports();
181
+
182
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
183
+ module_or_path = fetch(module_or_path);
184
+ }
185
+
186
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
187
+
188
+ return __wbg_finalize_init(instance, module);
189
+ }
190
+
191
+ export { initSync };
192
+ export default __wbg_init;
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@raviqqe/stak",
3
3
  "type": "module",
4
4
  "description": "Stak Scheme in WebAssembly",
5
- "version": "0.12.34",
5
+ "version": "0.12.36",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -11,7 +11,19 @@
11
11
  "files": [
12
12
  "stak_wasm_bg.wasm",
13
13
  "stak_wasm.js",
14
- "stak_wasm.d.ts"
14
+ "stak_wasm.d.ts",
15
+ "compile_bg.wasm",
16
+ "compile.js",
17
+ "compile.d.ts",
18
+ "interpret_bg.wasm",
19
+ "interpret.js",
20
+ "interpret.d.ts",
21
+ "repl_bg.wasm",
22
+ "repl.js",
23
+ "repl.d.ts",
24
+ "run_bg.wasm",
25
+ "run.js",
26
+ "run.d.ts"
15
27
  ],
16
28
  "main": "stak_wasm.js",
17
29
  "types": "stak_wasm.d.ts",
@@ -25,5 +37,28 @@
25
37
  ],
26
38
  "publishConfig": {
27
39
  "provenance": true
40
+ },
41
+ "exports": {
42
+ ".": {
43
+ "types": "./stak_wasm.d.ts",
44
+ "default": "./stak_wasm.js"
45
+ },
46
+ "./compile": {
47
+ "types": "./compile.d.ts",
48
+ "default": "./compile.js"
49
+ },
50
+ "./interpret": {
51
+ "types": "./interpret.d.ts",
52
+ "default": "./interpret.js"
53
+ },
54
+ "./repl": {
55
+ "types": "./repl.d.ts",
56
+ "default": "./repl.js"
57
+ },
58
+ "./run": {
59
+ "types": "./run.d.ts",
60
+ "default": "./run.js"
61
+ },
62
+ "./*": "./*"
28
63
  }
29
64
  }
package/repl.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Runs a REPL interpreter.
5
+ */
6
+ export function repl(heap_size: number): Promise<void>;
7
+
8
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
9
+
10
+ export interface InitOutput {
11
+ readonly memory: WebAssembly.Memory;
12
+ readonly repl: (a: number) => any;
13
+ readonly wasm_bindgen_a10390bb34bad561___convert__closures_____invoke___wasm_bindgen_a10390bb34bad561___JsValue_____: (a: number, b: number, c: any) => void;
14
+ readonly wasm_bindgen_a10390bb34bad561___closure__destroy___dyn_core_6a51abefd5362b2___ops__function__FnMut__wasm_bindgen_a10390bb34bad561___JsValue____Output_______: (a: number, b: number) => void;
15
+ readonly wasm_bindgen_a10390bb34bad561___convert__closures_____invoke___wasm_bindgen_a10390bb34bad561___JsValue__wasm_bindgen_a10390bb34bad561___JsValue_____: (a: number, b: number, c: any, d: any) => void;
16
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
17
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
18
+ readonly __wbindgen_exn_store: (a: number) => void;
19
+ readonly __externref_table_alloc: () => number;
20
+ readonly __wbindgen_externrefs: WebAssembly.Table;
21
+ readonly __wbindgen_start: () => void;
22
+ }
23
+
24
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
25
+ /**
26
+ * Instantiates the given `module`, which can either be bytes or
27
+ * a precompiled `WebAssembly.Module`.
28
+ *
29
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
30
+ *
31
+ * @returns {InitOutput}
32
+ */
33
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
34
+
35
+ /**
36
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
37
+ * for everything else, calls `WebAssembly.instantiate` directly.
38
+ *
39
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
40
+ *
41
+ * @returns {Promise<InitOutput>}
42
+ */
43
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;