@raviqqe/stak 0.12.21 → 0.12.23

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
@@ -2,7 +2,7 @@
2
2
  "name": "@raviqqe/stak",
3
3
  "type": "module",
4
4
  "description": "Stak Scheme in WebAssembly",
5
- "version": "0.12.21",
5
+ "version": "0.12.23",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/stak_wasm.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Runs a Scheme script with standard input and returns its standard output.
5
- */
6
- export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
7
3
  /**
8
4
  * Interprets bytecode with standard input and returns its standard output.
9
5
  */
10
6
  export function interpret(bytecode: Uint8Array, input: Uint8Array, heap_size: number): Uint8Array;
7
+ /**
8
+ * Runs a Scheme script with standard input and returns its standard output.
9
+ */
10
+ export function run(source: string, input: Uint8Array, heap_size: number): Uint8Array;
11
11
  /**
12
12
  * Compiles source codes in Scheme.
13
13
  */
@@ -25,16 +25,16 @@ export interface InitOutput {
25
25
  readonly interpret: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
26
26
  readonly repl: (a: number) => any;
27
27
  readonly run: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
28
- readonly __wbindgen_exn_store: (a: number) => void;
29
- readonly __externref_table_alloc: () => number;
30
- readonly __wbindgen_export_2: WebAssembly.Table;
31
- readonly __wbindgen_export_3: WebAssembly.Table;
28
+ readonly wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b: (a: number, b: number, c: any) => void;
29
+ readonly wasm_bindgen__closure__destroy__h88d41d2f204608f4: (a: number, b: number) => void;
30
+ readonly wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065: (a: number, b: number, c: any, d: any) => void;
32
31
  readonly __wbindgen_malloc: (a: number, b: number) => number;
33
32
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
33
+ readonly __wbindgen_exn_store: (a: number) => void;
34
+ readonly __externref_table_alloc: () => number;
35
+ readonly __wbindgen_externrefs: WebAssembly.Table;
34
36
  readonly __externref_table_dealloc: (a: number) => void;
35
37
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
36
- readonly closure18_externref_shim: (a: number, b: number, c: any) => void;
37
- readonly closure42_externref_shim: (a: number, b: number, c: any, d: any) => void;
38
38
  readonly __wbindgen_start: () => void;
39
39
  }
40
40
 
package/stak_wasm.js CHANGED
@@ -1,24 +1,5 @@
1
1
  let wasm;
2
2
 
3
- function addToExternrefTable0(obj) {
4
- const idx = wasm.__externref_table_alloc();
5
- wasm.__wbindgen_export_2.set(idx, obj);
6
- return idx;
7
- }
8
-
9
- function handleError(f, args) {
10
- try {
11
- return f.apply(this, args);
12
- } catch (e) {
13
- const idx = addToExternrefTable0(e);
14
- wasm.__wbindgen_exn_store(idx);
15
- }
16
- }
17
-
18
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
19
-
20
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
21
-
22
3
  let cachedUint8ArrayMemory0 = null;
23
4
 
24
5
  function getUint8ArrayMemory0() {
@@ -28,44 +9,25 @@ function getUint8ArrayMemory0() {
28
9
  return cachedUint8ArrayMemory0;
29
10
  }
30
11
 
31
- function getStringFromWasm0(ptr, len) {
32
- ptr = ptr >>> 0;
33
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
34
- }
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
35
13
 
36
- function isLikeNone(x) {
37
- return x === undefined || x === null;
38
- }
14
+ cachedTextDecoder.decode();
39
15
 
40
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
41
- ? { register: () => {}, unregister: () => {} }
42
- : new FinalizationRegistry(state => {
43
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
44
- });
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
+ }
45
27
 
46
- function makeMutClosure(arg0, arg1, dtor, f) {
47
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
48
- const real = (...args) => {
49
- // First up with a closure we increment the internal reference
50
- // count. This ensures that the Rust closure environment won't
51
- // be deallocated while we're invoking it.
52
- state.cnt++;
53
- const a = state.a;
54
- state.a = 0;
55
- try {
56
- return f(a, state.b, ...args);
57
- } finally {
58
- if (--state.cnt === 0) {
59
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
60
- CLOSURE_DTORS.unregister(state);
61
- } else {
62
- state.a = a;
63
- }
64
- }
65
- };
66
- real.original = state;
67
- CLOSURE_DTORS.register(real, state, state);
68
- return real;
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
69
31
  }
70
32
 
71
33
  function debugString(val) {
@@ -135,20 +97,18 @@ function debugString(val) {
135
97
 
136
98
  let WASM_VECTOR_LEN = 0;
137
99
 
138
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
100
+ const cachedTextEncoder = new TextEncoder();
139
101
 
140
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
141
- ? function (arg, view) {
142
- return cachedTextEncoder.encodeInto(arg, view);
102
+ if (!('encodeInto' in cachedTextEncoder)) {
103
+ cachedTextEncoder.encodeInto = function (arg, view) {
104
+ const buf = cachedTextEncoder.encode(arg);
105
+ view.set(buf);
106
+ return {
107
+ read: arg.length,
108
+ written: buf.length
109
+ };
110
+ }
143
111
  }
144
- : function (arg, view) {
145
- const buf = cachedTextEncoder.encode(arg);
146
- view.set(buf);
147
- return {
148
- read: arg.length,
149
- written: buf.length
150
- };
151
- });
152
112
 
153
113
  function passStringToWasm0(arg, malloc, realloc) {
154
114
 
@@ -179,7 +139,7 @@ function passStringToWasm0(arg, malloc, realloc) {
179
139
  }
180
140
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
181
141
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
182
- const ret = encodeString(arg, view);
142
+ const ret = cachedTextEncoder.encodeInto(arg, view);
183
143
 
184
144
  offset += ret.written;
185
145
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -198,6 +158,57 @@ function getDataViewMemory0() {
198
158
  return cachedDataViewMemory0;
199
159
  }
200
160
 
161
+ function isLikeNone(x) {
162
+ return x === undefined || x === null;
163
+ }
164
+
165
+ function addToExternrefTable0(obj) {
166
+ const idx = wasm.__externref_table_alloc();
167
+ wasm.__wbindgen_externrefs.set(idx, obj);
168
+ return idx;
169
+ }
170
+
171
+ function handleError(f, args) {
172
+ try {
173
+ return f.apply(this, args);
174
+ } catch (e) {
175
+ const idx = addToExternrefTable0(e);
176
+ wasm.__wbindgen_exn_store(idx);
177
+ }
178
+ }
179
+
180
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
181
+ ? { register: () => {}, unregister: () => {} }
182
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
183
+
184
+ function makeMutClosure(arg0, arg1, dtor, f) {
185
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
186
+ const real = (...args) => {
187
+
188
+ // First up with a closure we increment the internal reference
189
+ // count. This ensures that the Rust closure environment won't
190
+ // be deallocated while we're invoking it.
191
+ state.cnt++;
192
+ const a = state.a;
193
+ state.a = 0;
194
+ try {
195
+ return f(a, state.b, ...args);
196
+ } finally {
197
+ state.a = a;
198
+ real._wbg_cb_unref();
199
+ }
200
+ };
201
+ real._wbg_cb_unref = () => {
202
+ if (--state.cnt === 0) {
203
+ state.dtor(state.a, state.b);
204
+ state.a = 0;
205
+ CLOSURE_DTORS.unregister(state);
206
+ }
207
+ };
208
+ CLOSURE_DTORS.register(real, state, state);
209
+ return real;
210
+ }
211
+
201
212
  function passArray8ToWasm0(arg, malloc) {
202
213
  const ptr = malloc(arg.length * 1, 1) >>> 0;
203
214
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -206,7 +217,7 @@ function passArray8ToWasm0(arg, malloc) {
206
217
  }
207
218
 
208
219
  function takeFromExternrefTable0(idx) {
209
- const value = wasm.__wbindgen_export_2.get(idx);
220
+ const value = wasm.__wbindgen_externrefs.get(idx);
210
221
  wasm.__externref_table_dealloc(idx);
211
222
  return value;
212
223
  }
@@ -216,18 +227,18 @@ function getArrayU8FromWasm0(ptr, len) {
216
227
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
217
228
  }
218
229
  /**
219
- * Runs a Scheme script with standard input and returns its standard output.
220
- * @param {string} source
230
+ * Interprets bytecode with standard input and returns its standard output.
231
+ * @param {Uint8Array} bytecode
221
232
  * @param {Uint8Array} input
222
233
  * @param {number} heap_size
223
234
  * @returns {Uint8Array}
224
235
  */
225
- export function run(source, input, heap_size) {
226
- const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
236
+ export function interpret(bytecode, input, heap_size) {
237
+ const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
227
238
  const len0 = WASM_VECTOR_LEN;
228
239
  const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
229
240
  const len1 = WASM_VECTOR_LEN;
230
- const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
241
+ const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
231
242
  if (ret[3]) {
232
243
  throw takeFromExternrefTable0(ret[2]);
233
244
  }
@@ -237,18 +248,18 @@ export function run(source, input, heap_size) {
237
248
  }
238
249
 
239
250
  /**
240
- * Interprets bytecode with standard input and returns its standard output.
241
- * @param {Uint8Array} bytecode
251
+ * Runs a Scheme script with standard input and returns its standard output.
252
+ * @param {string} source
242
253
  * @param {Uint8Array} input
243
254
  * @param {number} heap_size
244
255
  * @returns {Uint8Array}
245
256
  */
246
- export function interpret(bytecode, input, heap_size) {
247
- const ptr0 = passArray8ToWasm0(bytecode, wasm.__wbindgen_malloc);
257
+ export function run(source, input, heap_size) {
258
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
248
259
  const len0 = WASM_VECTOR_LEN;
249
260
  const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
250
261
  const len1 = WASM_VECTOR_LEN;
251
- const ret = wasm.interpret(ptr0, len0, ptr1, len1, heap_size);
262
+ const ret = wasm.run(ptr0, len0, ptr1, len1, heap_size);
252
263
  if (ret[3]) {
253
264
  throw takeFromExternrefTable0(ret[2]);
254
265
  }
@@ -284,14 +295,16 @@ export function repl(heap_size) {
284
295
  return ret;
285
296
  }
286
297
 
287
- function __wbg_adapter_24(arg0, arg1, arg2) {
288
- wasm.closure18_externref_shim(arg0, arg1, arg2);
298
+ function wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2) {
299
+ wasm.wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b(arg0, arg1, arg2);
289
300
  }
290
301
 
291
- function __wbg_adapter_45(arg0, arg1, arg2, arg3) {
292
- wasm.closure42_externref_shim(arg0, arg1, arg2, arg3);
302
+ function wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3) {
303
+ wasm.wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(arg0, arg1, arg2, arg3);
293
304
  }
294
305
 
306
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
307
+
295
308
  async function __wbg_load(module, imports) {
296
309
  if (typeof Response === 'function' && module instanceof Response) {
297
310
  if (typeof WebAssembly.instantiateStreaming === 'function') {
@@ -299,7 +312,9 @@ async function __wbg_load(module, imports) {
299
312
  return await WebAssembly.instantiateStreaming(module, imports);
300
313
 
301
314
  } catch (e) {
302
- if (module.headers.get('Content-Type') != 'application/wasm') {
315
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
316
+
317
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
303
318
  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);
304
319
 
305
320
  } else {
@@ -326,22 +341,57 @@ async function __wbg_load(module, imports) {
326
341
  function __wbg_get_imports() {
327
342
  const imports = {};
328
343
  imports.wbg = {};
329
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
330
- const ret = arg0.call(arg1);
344
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
345
+ const ret = Error(getStringFromWasm0(arg0, arg1));
331
346
  return ret;
332
- }, arguments) };
333
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
347
+ };
348
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
349
+ const ret = debugString(arg1);
350
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
+ const len1 = WASM_VECTOR_LEN;
352
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
353
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
354
+ };
355
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
356
+ const ret = typeof(arg0) === 'function';
357
+ return ret;
358
+ };
359
+ imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
360
+ const ret = arg0 === null;
361
+ return ret;
362
+ };
363
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
364
+ const ret = arg0 === undefined;
365
+ return ret;
366
+ };
367
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
368
+ const obj = arg1;
369
+ const ret = typeof(obj) === 'number' ? obj : undefined;
370
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
371
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
372
+ };
373
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
374
+ throw new Error(getStringFromWasm0(arg0, arg1));
375
+ };
376
+ imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
377
+ arg0._wbg_cb_unref();
378
+ };
379
+ imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
334
380
  const ret = arg0.call(arg1, arg2);
335
381
  return ret;
336
382
  }, arguments) };
337
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
383
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
384
+ const ret = arg0.call(arg1);
385
+ return ret;
386
+ }, arguments) };
387
+ imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
338
388
  try {
339
389
  var state0 = {a: arg0, b: arg1};
340
390
  var cb0 = (arg0, arg1) => {
341
391
  const a = state0.a;
342
392
  state0.a = 0;
343
393
  try {
344
- return __wbg_adapter_45(a, state0.b, arg0, arg1);
394
+ return wasm_bindgen__convert__closures_____invoke__h30ad7cd5bc317065(a, state0.b, arg0, arg1);
345
395
  } finally {
346
396
  state0.a = a;
347
397
  }
@@ -352,83 +402,64 @@ function __wbg_get_imports() {
352
402
  state0.a = state0.b = 0;
353
403
  }
354
404
  };
355
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
405
+ imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
356
406
  const ret = new Function(getStringFromWasm0(arg0, arg1));
357
407
  return ret;
358
408
  };
359
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
360
- queueMicrotask(arg0);
361
- };
362
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
409
+ imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
363
410
  const ret = arg0.queueMicrotask;
364
411
  return ret;
365
412
  };
366
- imports.wbg.__wbg_readstdin_1692496acd6401d8 = function() {
413
+ imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
414
+ queueMicrotask(arg0);
415
+ };
416
+ imports.wbg.__wbg_read_stdin_d8100defb5d83f08 = function() {
367
417
  const ret = read_stdin();
368
418
  return ret;
369
419
  };
370
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
420
+ imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
371
421
  const ret = Promise.resolve(arg0);
372
422
  return ret;
373
423
  };
374
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
424
+ imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
375
425
  const ret = typeof global === 'undefined' ? null : global;
376
426
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
377
427
  };
378
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
428
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
379
429
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
380
430
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
381
431
  };
382
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
432
+ imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
383
433
  const ret = typeof self === 'undefined' ? null : self;
384
434
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
385
435
  };
386
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
436
+ imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
387
437
  const ret = typeof window === 'undefined' ? null : window;
388
438
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
389
439
  };
390
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
440
+ imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
391
441
  const ret = arg0.then(arg1);
392
442
  return ret;
393
443
  };
394
- imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
444
+ imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
395
445
  const ret = arg0.then(arg1, arg2);
396
446
  return ret;
397
447
  };
398
- imports.wbg.__wbg_writestderr_5e5a6f0791912e3b = function(arg0) {
448
+ imports.wbg.__wbg_write_stderr_b2a71bdc793cdeb2 = function(arg0) {
399
449
  const ret = write_stderr(arg0);
400
450
  return ret;
401
451
  };
402
- imports.wbg.__wbg_writestdout_9167276bd015edfd = function(arg0) {
452
+ imports.wbg.__wbg_write_stdout_18710436edb6c757 = function(arg0) {
403
453
  const ret = write_stdout(arg0);
404
454
  return ret;
405
455
  };
406
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
407
- const obj = arg0.original;
408
- if (obj.cnt-- == 1) {
409
- obj.a = 0;
410
- return true;
411
- }
412
- const ret = false;
413
- return ret;
414
- };
415
- imports.wbg.__wbindgen_closure_wrapper90 = function(arg0, arg1, arg2) {
416
- const ret = makeMutClosure(arg0, arg1, 19, __wbg_adapter_24);
417
- return ret;
418
- };
419
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
420
- const ret = debugString(arg1);
421
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
422
- const len1 = WASM_VECTOR_LEN;
423
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
424
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
425
- };
426
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
427
- const ret = new Error(getStringFromWasm0(arg0, arg1));
456
+ imports.wbg.__wbindgen_cast_80e5451c6d1fd870 = function(arg0, arg1) {
457
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 17, function: Function { arguments: [Externref], shim_idx: 18, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
458
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h88d41d2f204608f4, wasm_bindgen__convert__closures_____invoke__h54523733bb5ff34b);
428
459
  return ret;
429
460
  };
430
461
  imports.wbg.__wbindgen_init_externref_table = function() {
431
- const table = wasm.__wbindgen_export_2;
462
+ const table = wasm.__wbindgen_externrefs;
432
463
  const offset = table.grow(4);
433
464
  table.set(0, undefined);
434
465
  table.set(offset + 0, undefined);
@@ -437,35 +468,10 @@ function __wbg_get_imports() {
437
468
  table.set(offset + 3, false);
438
469
  ;
439
470
  };
440
- imports.wbg.__wbindgen_is_function = function(arg0) {
441
- const ret = typeof(arg0) === 'function';
442
- return ret;
443
- };
444
- imports.wbg.__wbindgen_is_null = function(arg0) {
445
- const ret = arg0 === null;
446
- return ret;
447
- };
448
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
449
- const ret = arg0 === undefined;
450
- return ret;
451
- };
452
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
453
- const obj = arg1;
454
- const ret = typeof(obj) === 'number' ? obj : undefined;
455
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
456
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
457
- };
458
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
459
- throw new Error(getStringFromWasm0(arg0, arg1));
460
- };
461
471
 
462
472
  return imports;
463
473
  }
464
474
 
465
- function __wbg_init_memory(imports, memory) {
466
-
467
- }
468
-
469
475
  function __wbg_finalize_init(instance, module) {
470
476
  wasm = instance.exports;
471
477
  __wbg_init.__wbindgen_wasm_module = module;
@@ -491,8 +497,6 @@ function initSync(module) {
491
497
 
492
498
  const imports = __wbg_get_imports();
493
499
 
494
- __wbg_init_memory(imports);
495
-
496
500
  if (!(module instanceof WebAssembly.Module)) {
497
501
  module = new WebAssembly.Module(module);
498
502
  }
@@ -523,8 +527,6 @@ async function __wbg_init(module_or_path) {
523
527
  module_or_path = fetch(module_or_path);
524
528
  }
525
529
 
526
- __wbg_init_memory(imports);
527
-
528
530
  const { instance, module } = await __wbg_load(await module_or_path, imports);
529
531
 
530
532
  return __wbg_finalize_init(instance, module);
package/stak_wasm_bg.wasm CHANGED
Binary file