@flowscripter/template-bun-wasm-rust-library 1.3.34 → 1.3.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.
@@ -25,12 +25,11 @@ function __wbg_get_imports() {
25
25
  __proto__: null,
26
26
  __wbindgen_init_externref_table: function() {
27
27
  const table = wasm.__wbindgen_externrefs;
28
- const offset = table.grow(4);
29
28
  table.set(0, undefined);
30
- table.set(offset + 0, undefined);
31
- table.set(offset + 1, null);
32
- table.set(offset + 2, true);
33
- table.set(offset + 3, false);
29
+ table.set(1024, undefined);
30
+ table.set(1025, null);
31
+ table.set(1026, true);
32
+ table.set(1027, false);
34
33
  },
35
34
  };
36
35
  return {
@@ -107,9 +106,17 @@ function initSync(module) {
107
106
  return __wbg_finalize_init(instance, module);
108
107
  }
109
108
 
109
+ let __wbg_init_promise;
110
110
  async function __wbg_init(module_or_path) {
111
111
  if (wasm !== undefined) return wasm;
112
+ if (__wbg_init_promise === undefined) {
113
+ __wbg_init_promise = __wbg_init_once(module_or_path);
114
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
115
+ }
116
+ return __wbg_init_promise;
117
+ }
112
118
 
119
+ async function __wbg_init_once(module_or_path) {
113
120
 
114
121
  if (module_or_path !== undefined) {
115
122
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/template-bun-wasm-rust-library",
3
- "version": "1.3.34",
3
+ "version": "1.3.36",
4
4
  "description": "Project template for a Rust library compiled to WASM exposed as a Bun module",
5
5
  "keywords": [
6
6
  "bun",
@@ -25,12 +25,11 @@ function __wbg_get_imports() {
25
25
  __proto__: null,
26
26
  __wbindgen_init_externref_table: function() {
27
27
  const table = wasm.__wbindgen_externrefs;
28
- const offset = table.grow(4);
29
28
  table.set(0, undefined);
30
- table.set(offset + 0, undefined);
31
- table.set(offset + 1, null);
32
- table.set(offset + 2, true);
33
- table.set(offset + 3, false);
29
+ table.set(1024, undefined);
30
+ table.set(1025, null);
31
+ table.set(1026, true);
32
+ table.set(1027, false);
34
33
  },
35
34
  };
36
35
  return {
@@ -107,9 +106,17 @@ function initSync(module) {
107
106
  return __wbg_finalize_init(instance, module);
108
107
  }
109
108
 
109
+ let __wbg_init_promise;
110
110
  async function __wbg_init(module_or_path) {
111
111
  if (wasm !== undefined) return wasm;
112
+ if (__wbg_init_promise === undefined) {
113
+ __wbg_init_promise = __wbg_init_once(module_or_path);
114
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
115
+ }
116
+ return __wbg_init_promise;
117
+ }
112
118
 
119
+ async function __wbg_init_once(module_or_path) {
113
120
 
114
121
  if (module_or_path !== undefined) {
115
122
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {