runmat 0.2.21 → 0.2.24

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.
@@ -603,19 +603,19 @@ export function initRunMat(options) {
603
603
  }
604
604
 
605
605
  function __wbg_adapter_56(arg0, arg1, arg2) {
606
- wasm.closure2513_externref_shim(arg0, arg1, arg2);
606
+ wasm.closure2584_externref_shim(arg0, arg1, arg2);
607
607
  }
608
608
 
609
609
  function __wbg_adapter_59(arg0, arg1, arg2) {
610
- wasm.closure6375_externref_shim(arg0, arg1, arg2);
610
+ wasm.closure6470_externref_shim(arg0, arg1, arg2);
611
611
  }
612
612
 
613
613
  function __wbg_adapter_62(arg0, arg1, arg2) {
614
- wasm.closure6381_externref_shim(arg0, arg1, arg2);
614
+ wasm.closure6476_externref_shim(arg0, arg1, arg2);
615
615
  }
616
616
 
617
- function __wbg_adapter_614(arg0, arg1, arg2, arg3) {
618
- wasm.closure6425_externref_shim(arg0, arg1, arg2, arg3);
617
+ function __wbg_adapter_616(arg0, arg1, arg2, arg3) {
618
+ wasm.closure6520_externref_shim(arg0, arg1, arg2, arg3);
619
619
  }
620
620
 
621
621
  const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
@@ -757,6 +757,16 @@ export class RunMatWasm {
757
757
  }
758
758
  return ret[0] !== 0;
759
759
  }
760
+ /**
761
+ * @returns {any}
762
+ */
763
+ workspaceSnapshot() {
764
+ const ret = wasm.runmatwasm_workspaceSnapshot(this.__wbg_ptr);
765
+ if (ret[2]) {
766
+ throw takeFromExternrefTable0(ret[1]);
767
+ }
768
+ return takeFromExternrefTable0(ret[0]);
769
+ }
760
770
  /**
761
771
  * @param {number} handle
762
772
  * @returns {Uint8Array | undefined}
@@ -775,16 +785,23 @@ export class RunMatWasm {
775
785
  }
776
786
  /**
777
787
  * @param {Uint8Array} scene
778
- * @returns {number | undefined}
788
+ * @returns {Promise<number | undefined>}
779
789
  */
780
790
  importFigureScene(scene) {
781
791
  const ptr0 = passArray8ToWasm0(scene, wasm.__wbindgen_malloc);
782
792
  const len0 = WASM_VECTOR_LEN;
783
793
  const ret = wasm.runmatwasm_importFigureScene(this.__wbg_ptr, ptr0, len0);
784
- if (ret[2]) {
785
- throw takeFromExternrefTable0(ret[1]);
786
- }
787
- return ret[0] === 0x100000001 ? undefined : ret[0];
794
+ return ret;
795
+ }
796
+ /**
797
+ * @param {string} path
798
+ * @returns {Promise<number | undefined>}
799
+ */
800
+ importFigureSceneFromPath(path) {
801
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
802
+ const len0 = WASM_VECTOR_LEN;
803
+ const ret = wasm.runmatwasm_importFigureSceneFromPath(this.__wbg_ptr, ptr0, len0);
804
+ return ret;
788
805
  }
789
806
  /**
790
807
  * @returns {boolean}
@@ -1625,7 +1642,7 @@ function __wbg_get_imports() {
1625
1642
  const a = state0.a;
1626
1643
  state0.a = 0;
1627
1644
  try {
1628
- return __wbg_adapter_614(a, state0.b, arg0, arg1);
1645
+ return __wbg_adapter_616(a, state0.b, arg0, arg1);
1629
1646
  } finally {
1630
1647
  state0.a = a;
1631
1648
  }
@@ -2071,16 +2088,16 @@ function __wbg_get_imports() {
2071
2088
  const ret = false;
2072
2089
  return ret;
2073
2090
  };
2074
- imports.wbg.__wbindgen_closure_wrapper19085 = function(arg0, arg1, arg2) {
2075
- const ret = makeMutClosure(arg0, arg1, 6376, __wbg_adapter_59);
2091
+ imports.wbg.__wbindgen_closure_wrapper19311 = function(arg0, arg1, arg2) {
2092
+ const ret = makeMutClosure(arg0, arg1, 6471, __wbg_adapter_59);
2076
2093
  return ret;
2077
2094
  };
2078
- imports.wbg.__wbindgen_closure_wrapper19502 = function(arg0, arg1, arg2) {
2079
- const ret = makeMutClosure(arg0, arg1, 6382, __wbg_adapter_62);
2095
+ imports.wbg.__wbindgen_closure_wrapper19728 = function(arg0, arg1, arg2) {
2096
+ const ret = makeMutClosure(arg0, arg1, 6477, __wbg_adapter_62);
2080
2097
  return ret;
2081
2098
  };
2082
- imports.wbg.__wbindgen_closure_wrapper5326 = function(arg0, arg1, arg2) {
2083
- const ret = makeMutClosure(arg0, arg1, 2514, __wbg_adapter_56);
2099
+ imports.wbg.__wbindgen_closure_wrapper5659 = function(arg0, arg1, arg2) {
2100
+ const ret = makeMutClosure(arg0, arg1, 2585, __wbg_adapter_56);
2084
2101
  return ret;
2085
2102
  };
2086
2103
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -15,8 +15,10 @@ export const runmatwasm_stats: (a: number) => [number, number, number];
15
15
  export const runmatwasm_clearWorkspace: (a: number) => void;
16
16
  export const runmatwasm_exportWorkspaceState: (a: number, b: number, c: number) => any;
17
17
  export const runmatwasm_importWorkspaceState: (a: number, b: number, c: number) => [number, number, number];
18
+ export const runmatwasm_workspaceSnapshot: (a: number) => [number, number, number];
18
19
  export const runmatwasm_exportFigureScene: (a: number, b: number) => [number, number, number, number];
19
- export const runmatwasm_importFigureScene: (a: number, b: number, c: number) => [number, number, number];
20
+ export const runmatwasm_importFigureScene: (a: number, b: number, c: number) => any;
21
+ export const runmatwasm_importFigureSceneFromPath: (a: number, b: number, c: number) => any;
20
22
  export const runmatwasm_telemetryConsent: (a: number) => number;
21
23
  export const runmatwasm_gpuStatus: (a: number) => [number, number, number];
22
24
  export const runmatwasm_telemetryClientId: (a: number) => [number, number];
@@ -69,8 +71,8 @@ export const __wbindgen_export_4: WebAssembly.Table;
69
71
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
70
72
  export const __wbindgen_export_6: WebAssembly.Table;
71
73
  export const __externref_table_dealloc: (a: number) => void;
72
- export const closure2513_externref_shim: (a: number, b: number, c: any) => void;
73
- export const closure6375_externref_shim: (a: number, b: number, c: any) => void;
74
- export const closure6381_externref_shim: (a: number, b: number, c: any) => void;
75
- export const closure6425_externref_shim: (a: number, b: number, c: any, d: any) => void;
74
+ export const closure2584_externref_shim: (a: number, b: number, c: any) => void;
75
+ export const closure6470_externref_shim: (a: number, b: number, c: any) => void;
76
+ export const closure6476_externref_shim: (a: number, b: number, c: any) => void;
77
+ export const closure6520_externref_shim: (a: number, b: number, c: any, d: any) => void;
76
78
  export const __wbindgen_start: () => void;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runmat",
3
- "version": "0.2.21",
3
+ "version": "0.2.24",
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",