runmat 0.2.12 → 0.2.13

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.
@@ -40,7 +40,10 @@ export interface InitOutput {
40
40
  readonly __wbindgen_exn_store: (a: number) => void;
41
41
  readonly __externref_table_alloc: () => number;
42
42
  readonly __wbindgen_export_4: WebAssembly.Table;
43
+ readonly __wbindgen_export_5: WebAssembly.Table;
43
44
  readonly __externref_table_dealloc: (a: number) => void;
45
+ readonly closure2634_externref_shim: (a: number, b: number, c: any) => void;
46
+ readonly closure2656_externref_shim: (a: number, b: number, c: any, d: any) => void;
44
47
  readonly __wbindgen_start: () => void;
45
48
  }
46
49
 
@@ -107,6 +107,37 @@ function isLikeNone(x) {
107
107
  return x === undefined || x === null;
108
108
  }
109
109
 
110
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
111
+ ? { register: () => {}, unregister: () => {} }
112
+ : new FinalizationRegistry(state => {
113
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
114
+ });
115
+
116
+ function makeMutClosure(arg0, arg1, dtor, f) {
117
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
118
+ const real = (...args) => {
119
+ // First up with a closure we increment the internal reference
120
+ // count. This ensures that the Rust closure environment won't
121
+ // be deallocated while we're invoking it.
122
+ state.cnt++;
123
+ const a = state.a;
124
+ state.a = 0;
125
+ try {
126
+ return f(a, state.b, ...args);
127
+ } finally {
128
+ if (--state.cnt === 0) {
129
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
130
+ CLOSURE_DTORS.unregister(state);
131
+ } else {
132
+ state.a = a;
133
+ }
134
+ }
135
+ };
136
+ real.original = state;
137
+ CLOSURE_DTORS.register(real, state, state);
138
+ return real;
139
+ }
140
+
110
141
  function debugString(val) {
111
142
  // primitive types
112
143
  const type = typeof val;
@@ -373,6 +404,14 @@ export function setCompatMode(mode) {
373
404
  wasm.setCompatMode(ptr0, len0);
374
405
  }
375
406
 
407
+ function __wbg_adapter_32(arg0, arg1, arg2) {
408
+ wasm.closure2634_externref_shim(arg0, arg1, arg2);
409
+ }
410
+
411
+ function __wbg_adapter_120(arg0, arg1, arg2, arg3) {
412
+ wasm.closure2656_externref_shim(arg0, arg1, arg2, arg3);
413
+ }
414
+
376
415
  const __wbindgen_enum_XmlHttpRequestResponseType = ["", "arraybuffer", "blob", "document", "json", "text"];
377
416
 
378
417
  async function __wbg_load(module, imports) {
@@ -424,6 +463,10 @@ function __wbg_get_imports() {
424
463
  const ret = arg0.call(arg1);
425
464
  return ret;
426
465
  }, arguments) };
466
+ imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
467
+ const ret = arg0.call(arg1, arg2, arg3);
468
+ return ret;
469
+ }, arguments) };
427
470
  imports.wbg.__wbg_getAllResponseHeaders_83159b168d73a355 = function() { return handleError(function (arg0, arg1) {
428
471
  const ret = arg1.getAllResponseHeaders();
429
472
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -493,6 +536,24 @@ function __wbg_get_imports() {
493
536
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
494
537
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
495
538
  };
539
+ imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
540
+ try {
541
+ var state0 = {a: arg0, b: arg1};
542
+ var cb0 = (arg0, arg1) => {
543
+ const a = state0.a;
544
+ state0.a = 0;
545
+ try {
546
+ return __wbg_adapter_120(a, state0.b, arg0, arg1);
547
+ } finally {
548
+ state0.a = a;
549
+ }
550
+ };
551
+ const ret = new Promise(cb0);
552
+ return ret;
553
+ } finally {
554
+ state0.a = state0.b = 0;
555
+ }
556
+ };
496
557
  imports.wbg.__wbg_new_31a97dac4f10fab7 = function(arg0) {
497
558
  const ret = new Date(arg0);
498
559
  return ret;
@@ -591,6 +652,10 @@ function __wbg_get_imports() {
591
652
  const ret = arg0.status;
592
653
  return ret;
593
654
  }, arguments) };
655
+ imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
656
+ const ret = arg0.then(arg1, arg2);
657
+ return ret;
658
+ };
594
659
  imports.wbg.__wbg_width_5dde457d606ba683 = function(arg0) {
595
660
  const ret = arg0.width;
596
661
  return ret;
@@ -611,6 +676,19 @@ function __wbg_get_imports() {
611
676
  const ret = BigInt.asUintN(64, arg0);
612
677
  return ret;
613
678
  };
679
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
680
+ const obj = arg0.original;
681
+ if (obj.cnt-- == 1) {
682
+ obj.a = 0;
683
+ return true;
684
+ }
685
+ const ret = false;
686
+ return ret;
687
+ };
688
+ imports.wbg.__wbindgen_closure_wrapper9918 = function(arg0, arg1, arg2) {
689
+ const ret = makeMutClosure(arg0, arg1, 2635, __wbg_adapter_32);
690
+ return ret;
691
+ };
614
692
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
615
693
  const ret = debugString(arg1);
616
694
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -632,6 +710,10 @@ function __wbg_get_imports() {
632
710
  table.set(offset + 3, false);
633
711
  ;
634
712
  };
713
+ imports.wbg.__wbindgen_is_function = function(arg0) {
714
+ const ret = typeof(arg0) === 'function';
715
+ return ret;
716
+ };
635
717
  imports.wbg.__wbindgen_is_string = function(arg0) {
636
718
  const ret = typeof(arg0) === 'string';
637
719
  return ret;
Binary file
@@ -21,5 +21,8 @@ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) =>
21
21
  export const __wbindgen_exn_store: (a: number) => void;
22
22
  export const __externref_table_alloc: () => number;
23
23
  export const __wbindgen_export_4: WebAssembly.Table;
24
+ export const __wbindgen_export_5: WebAssembly.Table;
24
25
  export const __externref_table_dealloc: (a: number) => void;
26
+ export const closure2634_externref_shim: (a: number, b: number, c: any) => void;
27
+ export const closure2656_externref_shim: (a: number, b: number, c: any, d: any) => void;
25
28
  export const __wbindgen_start: () => void;
@@ -540,15 +540,15 @@ export function initRunMat(options) {
540
540
  }
541
541
 
542
542
  function __wbg_adapter_54(arg0, arg1, arg2) {
543
- wasm.closure5661_externref_shim(arg0, arg1, arg2);
543
+ wasm.closure5630_externref_shim(arg0, arg1, arg2);
544
544
  }
545
545
 
546
546
  function __wbg_adapter_57(arg0, arg1, arg2) {
547
- wasm.closure5668_externref_shim(arg0, arg1, arg2);
547
+ wasm.closure5637_externref_shim(arg0, arg1, arg2);
548
548
  }
549
549
 
550
550
  function __wbg_adapter_558(arg0, arg1, arg2, arg3) {
551
- wasm.closure5712_externref_shim(arg0, arg1, arg2, arg3);
551
+ wasm.closure5681_externref_shim(arg0, arg1, arg2, arg3);
552
552
  }
553
553
 
554
554
  const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
@@ -2056,13 +2056,13 @@ export function __wbindgen_cb_drop(arg0) {
2056
2056
  return ret;
2057
2057
  };
2058
2058
 
2059
- export function __wbindgen_closure_wrapper17292(arg0, arg1, arg2) {
2060
- const ret = makeMutClosure(arg0, arg1, 5662, __wbg_adapter_54);
2059
+ export function __wbindgen_closure_wrapper17249(arg0, arg1, arg2) {
2060
+ const ret = makeMutClosure(arg0, arg1, 5631, __wbg_adapter_54);
2061
2061
  return ret;
2062
2062
  };
2063
2063
 
2064
- export function __wbindgen_closure_wrapper17711(arg0, arg1, arg2) {
2065
- const ret = makeMutClosure(arg0, arg1, 5669, __wbg_adapter_57);
2064
+ export function __wbindgen_closure_wrapper17668(arg0, arg1, arg2) {
2065
+ const ret = makeMutClosure(arg0, arg1, 5638, __wbg_adapter_57);
2066
2066
  return ret;
2067
2067
  };
2068
2068
 
Binary file
@@ -58,7 +58,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
58
58
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
59
59
  export const __wbindgen_export_6: WebAssembly.Table;
60
60
  export const __externref_table_dealloc: (a: number) => void;
61
- export const closure5661_externref_shim: (a: number, b: number, c: any) => void;
62
- export const closure5668_externref_shim: (a: number, b: number, c: any) => void;
63
- export const closure5712_externref_shim: (a: number, b: number, c: any, d: any) => void;
61
+ export const closure5630_externref_shim: (a: number, b: number, c: any) => void;
62
+ export const closure5637_externref_shim: (a: number, b: number, c: any) => void;
63
+ export const closure5681_externref_shim: (a: number, b: number, c: any, d: any) => void;
64
64
  export const __wbindgen_start: () => void;
@@ -117,9 +117,9 @@ export interface InitOutput {
117
117
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
118
118
  readonly __wbindgen_export_6: WebAssembly.Table;
119
119
  readonly __externref_table_dealloc: (a: number) => void;
120
- readonly closure5661_externref_shim: (a: number, b: number, c: any) => void;
121
- readonly closure5668_externref_shim: (a: number, b: number, c: any) => void;
122
- readonly closure5712_externref_shim: (a: number, b: number, c: any, d: any) => void;
120
+ readonly closure5630_externref_shim: (a: number, b: number, c: any) => void;
121
+ readonly closure5637_externref_shim: (a: number, b: number, c: any) => void;
122
+ readonly closure5681_externref_shim: (a: number, b: number, c: any, d: any) => void;
123
123
  readonly __wbindgen_start: () => void;
124
124
  }
125
125
 
@@ -532,15 +532,15 @@ export function initRunMat(options) {
532
532
  }
533
533
 
534
534
  function __wbg_adapter_54(arg0, arg1, arg2) {
535
- wasm.closure5661_externref_shim(arg0, arg1, arg2);
535
+ wasm.closure5630_externref_shim(arg0, arg1, arg2);
536
536
  }
537
537
 
538
538
  function __wbg_adapter_57(arg0, arg1, arg2) {
539
- wasm.closure5668_externref_shim(arg0, arg1, arg2);
539
+ wasm.closure5637_externref_shim(arg0, arg1, arg2);
540
540
  }
541
541
 
542
542
  function __wbg_adapter_558(arg0, arg1, arg2, arg3) {
543
- wasm.closure5712_externref_shim(arg0, arg1, arg2, arg3);
543
+ wasm.closure5681_externref_shim(arg0, arg1, arg2, arg3);
544
544
  }
545
545
 
546
546
  const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
@@ -1828,12 +1828,12 @@ function __wbg_get_imports() {
1828
1828
  const ret = false;
1829
1829
  return ret;
1830
1830
  };
1831
- imports.wbg.__wbindgen_closure_wrapper17292 = function(arg0, arg1, arg2) {
1832
- const ret = makeMutClosure(arg0, arg1, 5662, __wbg_adapter_54);
1831
+ imports.wbg.__wbindgen_closure_wrapper17249 = function(arg0, arg1, arg2) {
1832
+ const ret = makeMutClosure(arg0, arg1, 5631, __wbg_adapter_54);
1833
1833
  return ret;
1834
1834
  };
1835
- imports.wbg.__wbindgen_closure_wrapper17711 = function(arg0, arg1, arg2) {
1836
- const ret = makeMutClosure(arg0, arg1, 5669, __wbg_adapter_57);
1835
+ imports.wbg.__wbindgen_closure_wrapper17668 = function(arg0, arg1, arg2) {
1836
+ const ret = makeMutClosure(arg0, arg1, 5638, __wbg_adapter_57);
1837
1837
  return ret;
1838
1838
  };
1839
1839
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -58,7 +58,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
58
58
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
59
59
  export const __wbindgen_export_6: WebAssembly.Table;
60
60
  export const __externref_table_dealloc: (a: number) => void;
61
- export const closure5661_externref_shim: (a: number, b: number, c: any) => void;
62
- export const closure5668_externref_shim: (a: number, b: number, c: any) => void;
63
- export const closure5712_externref_shim: (a: number, b: number, c: any, d: any) => void;
61
+ export const closure5630_externref_shim: (a: number, b: number, c: any) => void;
62
+ export const closure5637_externref_shim: (a: number, b: number, c: any) => void;
63
+ export const closure5681_externref_shim: (a: number, b: number, c: any, d: any) => void;
64
64
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runmat",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Blazing fast runtime for math. Run MATLAB code on CPU or GPU.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN ../../LICENSE.md",