runmat 0.2.11 → 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;
@@ -9,7 +9,7 @@ export function resizeFigureCanvas(handle: number, width: number, height: number
9
9
  export function renderCurrentFigureScene(handle: number): void;
10
10
  export function createPlotSurface(canvas: any): Promise<number>;
11
11
  export function destroyPlotSurface(surface_id: number): void;
12
- export function resizePlotSurface(surface_id: number, width: number, height: number): void;
12
+ export function resizePlotSurface(surface_id: number, width: number, height: number, pixels_per_point: number): void;
13
13
  export function bindSurfaceToFigure(surface_id: number, handle: number): void;
14
14
  export function presentSurface(surface_id: number): void;
15
15
  export function presentFigureOnSurface(surface_id: number, handle: number): void;
@@ -312,9 +312,10 @@ export function destroyPlotSurface(surface_id) {
312
312
  * @param {number} surface_id
313
313
  * @param {number} width
314
314
  * @param {number} height
315
+ * @param {number} pixels_per_point
315
316
  */
316
- export function resizePlotSurface(surface_id, width, height) {
317
- const ret = wasm.resizePlotSurface(surface_id, width, height);
317
+ export function resizePlotSurface(surface_id, width, height, pixels_per_point) {
318
+ const ret = wasm.resizePlotSurface(surface_id, width, height, pixels_per_point);
318
319
  if (ret[1]) {
319
320
  throw takeFromExternrefTable0(ret[0]);
320
321
  }
@@ -539,15 +540,15 @@ export function initRunMat(options) {
539
540
  }
540
541
 
541
542
  function __wbg_adapter_54(arg0, arg1, arg2) {
542
- wasm.closure5503_externref_shim(arg0, arg1, arg2);
543
+ wasm.closure5630_externref_shim(arg0, arg1, arg2);
543
544
  }
544
545
 
545
546
  function __wbg_adapter_57(arg0, arg1, arg2) {
546
- wasm.closure5510_externref_shim(arg0, arg1, arg2);
547
+ wasm.closure5637_externref_shim(arg0, arg1, arg2);
547
548
  }
548
549
 
549
- function __wbg_adapter_556(arg0, arg1, arg2, arg3) {
550
- wasm.closure5554_externref_shim(arg0, arg1, arg2, arg3);
550
+ function __wbg_adapter_558(arg0, arg1, arg2, arg3) {
551
+ wasm.closure5681_externref_shim(arg0, arg1, arg2, arg3);
551
552
  }
552
553
 
553
554
  const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
@@ -1543,7 +1544,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1543
1544
  const a = state0.a;
1544
1545
  state0.a = 0;
1545
1546
  try {
1546
- return __wbg_adapter_556(a, state0.b, arg0, arg1);
1547
+ return __wbg_adapter_558(a, state0.b, arg0, arg1);
1547
1548
  } finally {
1548
1549
  state0.a = a;
1549
1550
  }
@@ -1649,6 +1650,11 @@ export function __wbg_open_13a598ea50d82926() { return handleError(function (arg
1649
1650
  arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
1650
1651
  }, arguments) };
1651
1652
 
1653
+ export function __wbg_open_6c3f5ef5a0204c5d() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1654
+ const ret = arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1655
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1656
+ }, arguments) };
1657
+
1652
1658
  export function __wbg_performance_7a3ffd0b17f663ad(arg0) {
1653
1659
  const ret = arg0.performance;
1654
1660
  return ret;
@@ -2050,13 +2056,13 @@ export function __wbindgen_cb_drop(arg0) {
2050
2056
  return ret;
2051
2057
  };
2052
2058
 
2053
- export function __wbindgen_closure_wrapper16193(arg0, arg1, arg2) {
2054
- const ret = makeMutClosure(arg0, arg1, 5504, __wbg_adapter_54);
2059
+ export function __wbindgen_closure_wrapper17249(arg0, arg1, arg2) {
2060
+ const ret = makeMutClosure(arg0, arg1, 5631, __wbg_adapter_54);
2055
2061
  return ret;
2056
2062
  };
2057
2063
 
2058
- export function __wbindgen_closure_wrapper16667(arg0, arg1, arg2) {
2059
- const ret = makeMutClosure(arg0, arg1, 5511, __wbg_adapter_57);
2064
+ export function __wbindgen_closure_wrapper17668(arg0, arg1, arg2) {
2065
+ const ret = makeMutClosure(arg0, arg1, 5638, __wbg_adapter_57);
2060
2066
  return ret;
2061
2067
  };
2062
2068
 
Binary file
@@ -25,7 +25,7 @@ export const deregisterFigureCanvas: (a: number) => void;
25
25
  export const resizeFigureCanvas: (a: number, b: number, c: number) => [number, number];
26
26
  export const renderCurrentFigureScene: (a: number) => [number, number];
27
27
  export const createPlotSurface: (a: any) => any;
28
- export const resizePlotSurface: (a: number, b: number, c: number) => [number, number];
28
+ export const resizePlotSurface: (a: number, b: number, c: number, d: number) => [number, number];
29
29
  export const bindSurfaceToFigure: (a: number, b: number) => [number, number];
30
30
  export const presentSurface: (a: number) => [number, number];
31
31
  export const presentFigureOnSurface: (a: number, b: number) => [number, number];
@@ -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 closure5503_externref_shim: (a: number, b: number, c: any) => void;
62
- export const closure5510_externref_shim: (a: number, b: number, c: any) => void;
63
- export const closure5554_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;
@@ -9,7 +9,7 @@ export function resizeFigureCanvas(handle: number, width: number, height: number
9
9
  export function renderCurrentFigureScene(handle: number): void;
10
10
  export function createPlotSurface(canvas: any): Promise<number>;
11
11
  export function destroyPlotSurface(surface_id: number): void;
12
- export function resizePlotSurface(surface_id: number, width: number, height: number): void;
12
+ export function resizePlotSurface(surface_id: number, width: number, height: number, pixels_per_point: number): void;
13
13
  export function bindSurfaceToFigure(surface_id: number, handle: number): void;
14
14
  export function presentSurface(surface_id: number): void;
15
15
  export function presentFigureOnSurface(surface_id: number, handle: number): void;
@@ -84,7 +84,7 @@ export interface InitOutput {
84
84
  readonly resizeFigureCanvas: (a: number, b: number, c: number) => [number, number];
85
85
  readonly renderCurrentFigureScene: (a: number) => [number, number];
86
86
  readonly createPlotSurface: (a: any) => any;
87
- readonly resizePlotSurface: (a: number, b: number, c: number) => [number, number];
87
+ readonly resizePlotSurface: (a: number, b: number, c: number, d: number) => [number, number];
88
88
  readonly bindSurfaceToFigure: (a: number, b: number) => [number, number];
89
89
  readonly presentSurface: (a: number) => [number, number];
90
90
  readonly presentFigureOnSurface: (a: number, b: number) => [number, number];
@@ -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 closure5503_externref_shim: (a: number, b: number, c: any) => void;
121
- readonly closure5510_externref_shim: (a: number, b: number, c: any) => void;
122
- readonly closure5554_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
 
@@ -304,9 +304,10 @@ export function destroyPlotSurface(surface_id) {
304
304
  * @param {number} surface_id
305
305
  * @param {number} width
306
306
  * @param {number} height
307
+ * @param {number} pixels_per_point
307
308
  */
308
- export function resizePlotSurface(surface_id, width, height) {
309
- const ret = wasm.resizePlotSurface(surface_id, width, height);
309
+ export function resizePlotSurface(surface_id, width, height, pixels_per_point) {
310
+ const ret = wasm.resizePlotSurface(surface_id, width, height, pixels_per_point);
310
311
  if (ret[1]) {
311
312
  throw takeFromExternrefTable0(ret[0]);
312
313
  }
@@ -531,15 +532,15 @@ export function initRunMat(options) {
531
532
  }
532
533
 
533
534
  function __wbg_adapter_54(arg0, arg1, arg2) {
534
- wasm.closure5503_externref_shim(arg0, arg1, arg2);
535
+ wasm.closure5630_externref_shim(arg0, arg1, arg2);
535
536
  }
536
537
 
537
538
  function __wbg_adapter_57(arg0, arg1, arg2) {
538
- wasm.closure5510_externref_shim(arg0, arg1, arg2);
539
+ wasm.closure5637_externref_shim(arg0, arg1, arg2);
539
540
  }
540
541
 
541
- function __wbg_adapter_556(arg0, arg1, arg2, arg3) {
542
- wasm.closure5554_externref_shim(arg0, arg1, arg2, arg3);
542
+ function __wbg_adapter_558(arg0, arg1, arg2, arg3) {
543
+ wasm.closure5681_externref_shim(arg0, arg1, arg2, arg3);
543
544
  }
544
545
 
545
546
  const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
@@ -1422,7 +1423,7 @@ function __wbg_get_imports() {
1422
1423
  const a = state0.a;
1423
1424
  state0.a = 0;
1424
1425
  try {
1425
- return __wbg_adapter_556(a, state0.b, arg0, arg1);
1426
+ return __wbg_adapter_558(a, state0.b, arg0, arg1);
1426
1427
  } finally {
1427
1428
  state0.a = a;
1428
1429
  }
@@ -1508,6 +1509,10 @@ function __wbg_get_imports() {
1508
1509
  imports.wbg.__wbg_open_13a598ea50d82926 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1509
1510
  arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5 !== 0);
1510
1511
  }, arguments) };
1512
+ imports.wbg.__wbg_open_6c3f5ef5a0204c5d = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1513
+ const ret = arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1515
+ }, arguments) };
1511
1516
  imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
1512
1517
  const ret = arg0.performance;
1513
1518
  return ret;
@@ -1823,12 +1828,12 @@ function __wbg_get_imports() {
1823
1828
  const ret = false;
1824
1829
  return ret;
1825
1830
  };
1826
- imports.wbg.__wbindgen_closure_wrapper16193 = function(arg0, arg1, arg2) {
1827
- const ret = makeMutClosure(arg0, arg1, 5504, __wbg_adapter_54);
1831
+ imports.wbg.__wbindgen_closure_wrapper17249 = function(arg0, arg1, arg2) {
1832
+ const ret = makeMutClosure(arg0, arg1, 5631, __wbg_adapter_54);
1828
1833
  return ret;
1829
1834
  };
1830
- imports.wbg.__wbindgen_closure_wrapper16667 = function(arg0, arg1, arg2) {
1831
- const ret = makeMutClosure(arg0, arg1, 5511, __wbg_adapter_57);
1835
+ imports.wbg.__wbindgen_closure_wrapper17668 = function(arg0, arg1, arg2) {
1836
+ const ret = makeMutClosure(arg0, arg1, 5638, __wbg_adapter_57);
1832
1837
  return ret;
1833
1838
  };
1834
1839
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -25,7 +25,7 @@ export const deregisterFigureCanvas: (a: number) => void;
25
25
  export const resizeFigureCanvas: (a: number, b: number, c: number) => [number, number];
26
26
  export const renderCurrentFigureScene: (a: number) => [number, number];
27
27
  export const createPlotSurface: (a: any) => any;
28
- export const resizePlotSurface: (a: number, b: number, c: number) => [number, number];
28
+ export const resizePlotSurface: (a: number, b: number, c: number, d: number) => [number, number];
29
29
  export const bindSurfaceToFigure: (a: number, b: number) => [number, number];
30
30
  export const presentSurface: (a: number) => [number, number];
31
31
  export const presentFigureOnSurface: (a: number, b: number) => [number, number];
@@ -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 closure5503_externref_shim: (a: number, b: number, c: any) => void;
62
- export const closure5510_externref_shim: (a: number, b: number, c: any) => void;
63
- export const closure5554_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.11",
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",