diff --git a/Cargo.lock b/Cargo.lock index df4ae41..51abe57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,6 +56,31 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "deno_test" version = "0.1.0" @@ -63,6 +88,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "equivalent" version = "1.0.1" @@ -135,6 +166,9 @@ name = "id-arena" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" +dependencies = [ + "rayon", +] [[package]] name = "indexmap" @@ -165,10 +199,11 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -220,6 +255,26 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -248,6 +303,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.15" @@ -346,15 +407,16 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walrus" -version = "0.22.0" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68aa3c7b80be75c8458fc087453e5a31a226cfffede2e9b932393b2ea1c624a" +checksum = "6481311b98508f4bc2d0abbfa5d42172e7a54b4b24d8f15e28b0dc650be0c59f" dependencies = [ "anyhow", "gimli", "id-arena", "leb128", "log", + "rayon", "walrus-macro", "wasm-encoder", "wasmparser", @@ -374,24 +436,24 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -400,9 +462,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b21cf9e89b196d78ff95c442a8076cc417171001e75dc062fe2c421cd2a0f9" +checksum = "21e1a4a49abe9cd6f762fc65fac2ef5732afeeb66be369d2f71a85b165a533cf" dependencies = [ "anyhow", "base64", @@ -411,7 +473,6 @@ dependencies = [ "serde", "serde_json", "tempfile", - "unicode-ident", "walrus", "wasm-bindgen-externref-xform", "wasm-bindgen-multi-value-xform", @@ -423,9 +484,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-externref-xform" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9f5eaefdb356e4266ca53d76526f5500e1e3b0961da8ee932193f08ada25ec7" +checksum = "940542c5cdbe96c35f98b5da5c65fb9d18df55a0cb1d81fc5ca4acc4fda4d61c" dependencies = [ "anyhow", "walrus", @@ -434,9 +495,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -444,9 +505,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -457,9 +518,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-multi-value-xform" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22689c6bbdc7f3a9110f1aa21873398a7ab2c50474ba9a45595c9ffde49c0cd" +checksum = "64b5ad2e97adde0c3e4369c38e0dbaee329ad8f6cc2ee8e01d1d0b13bd8b14cf" dependencies = [ "anyhow", "walrus", @@ -468,15 +529,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-bindgen-threads-xform" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d3c6389a7c8fa49ee4f55847d01b74c640a60387598952cdf3211b8499520c" +checksum = "1cbdf2d55a50f7edc9dd9aecae7a3a40e9736fda851bd8816f98a86167c8c277" dependencies = [ "anyhow", "walrus", @@ -485,9 +549,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-conventions" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b4d6bf2704173b57d7f319316593a35f2102e18bc92251d96909f89e7d4595" +checksum = "b1c24fcaa34d2d84407122cfb1d3f37c3586756cf462be18e049b49245a16c08" dependencies = [ "anyhow", "leb128", @@ -498,9 +562,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-interpreter" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b123244c6bf9e7abbb6ad9aa98ed86f927b55ee9d95b5552dd9346910341d5e2" +checksum = "33f24921401faadd6944206f9d6837d07bbb5ff766ed51ad34528089f66550e0" dependencies = [ "anyhow", "log", @@ -510,9 +574,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.212.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501940df4418b8929eb6d52f1aade1fdd15a5b86c92453cb696e3c906bd3fc33" +checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" dependencies = [ "leb128", ] @@ -531,9 +595,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.212.0" +version = "0.214.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d28bc49ba1e5c5b61ffa7a2eace10820443c4b7d1c0b144109261d14570fdf8" +checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" dependencies = [ "ahash", "bitflags 2.4.1", diff --git a/lib/versions.ts b/lib/versions.ts index 6d12f55..32d9a90 100644 --- a/lib/versions.ts +++ b/lib/versions.ts @@ -6,10 +6,10 @@ interface WasmCrate { } export const versions = { - "wasm-bindgen": "0.2.95", - "wasm-bindgen-futures": "0.4.45", - "js-sys": "0.3.72", - "web-sys": "0.3.72", + "wasm-bindgen": "0.2.100", + "wasm-bindgen-futures": "0.4.50", + "js-sys": "0.3.77", + "web-sys": "0.3.77", } as const; export function verifyVersions(crate: WasmCrate) { diff --git a/lib/wasmbuild.d.ts b/lib/wasmbuild.d.ts index cda901c..6636db4 100644 --- a/lib/wasmbuild.d.ts +++ b/lib/wasmbuild.d.ts @@ -2,12 +2,6 @@ // deno-lint-ignore-file // deno-fmt-ignore-file -/** - * @param {string} name - * @param {string} ext - * @param {Uint8Array} wasm_bytes - * @returns {any} - */ export function generate_bindgen( name: string, ext: string, diff --git a/lib/wasmbuild.internal.js b/lib/wasmbuild.internal.js new file mode 100644 index 0000000..4c8e37b --- /dev/null +++ b/lib/wasmbuild.internal.js @@ -0,0 +1,262 @@ +// @generated file from wasmbuild -- do not edit +// @ts-nocheck: generated +// deno-lint-ignore-file +// deno-fmt-ignore-file + +let wasm; +export function __wbg_set_wasm(val) { + wasm = val; +} + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +function getObject(idx) { + return heap[idx]; +} + +let WASM_VECTOR_LEN = 0; + +let cachedUint8ArrayMemory0 = null; + +function getUint8ArrayMemory0() { + if ( + cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0 + ) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +const lTextEncoder = typeof TextEncoder === "undefined" + ? (0, module.require)("util").TextEncoder + : TextEncoder; + +let cachedTextEncoder = new lTextEncoder("utf-8"); + +const encodeString = typeof cachedTextEncoder.encodeInto === "function" + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); + } + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length, + }; + }; + +function passStringToWasm0(arg, malloc, realloc) { + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedDataViewMemory0 = null; + +function getDataViewMemory0() { + if ( + cachedDataViewMemory0 === null || + cachedDataViewMemory0.buffer.detached === true || + (cachedDataViewMemory0.buffer.detached === undefined && + cachedDataViewMemory0.buffer !== wasm.memory.buffer) + ) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +const lTextDecoder = typeof TextDecoder === "undefined" + ? (0, module.require)("util").TextDecoder + : TextDecoder; + +let cachedTextDecoder = new lTextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, +}); + +cachedTextDecoder.decode(); + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode( + getUint8ArrayMemory0().subarray(ptr, ptr + len), + ); +} + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8ArrayMemory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; +} +/** + * @param {string} name + * @param {string} ext + * @param {Uint8Array} wasm_bytes + * @returns {any} + */ +export function generate_bindgen(name, ext, wasm_bytes) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + name, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0( + ext, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passArray8ToWasm0(wasm_bytes, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + wasm.generate_bindgen(retptr, ptr0, len0, ptr1, len1, ptr2, len2); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); + var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); + if (r2) { + throw takeObject(r1); + } + return takeObject(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { + const ret = String(getObject(arg1)); + const ptr1 = passStringToWasm0( + ret, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); +} + +export function __wbg_new_405e22f390576ce2() { + const ret = new Object(); + return addHeapObject(ret); +} + +export function __wbg_new_5e0be73521bc8c17() { + const ret = new Map(); + return addHeapObject(ret); +} + +export function __wbg_new_78feb108b6472713() { + const ret = new Array(); + return addHeapObject(ret); +} + +export function __wbg_new_c68d7209be747379(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); +} + +export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) { + getObject(arg0)[arg1 >>> 0] = takeObject(arg2); +} + +export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); +} + +export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) { + const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +} + +export function __wbindgen_error_new(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); +} + +export function __wbindgen_is_string(arg0) { + const ret = typeof (getObject(arg0)) === "string"; + return ret; +} + +export function __wbindgen_number_new(arg0) { + const ret = arg0; + return addHeapObject(ret); +} + +export function __wbindgen_object_clone_ref(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); +} + +export function __wbindgen_object_drop_ref(arg0) { + takeObject(arg0); +} + +export function __wbindgen_string_new(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +} + +export function __wbindgen_throw(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +} diff --git a/lib/wasmbuild.js b/lib/wasmbuild.js index ceaa800..699abab 100644 --- a/lib/wasmbuild.js +++ b/lib/wasmbuild.js @@ -4,8 +4,8 @@ // deno-fmt-ignore-file // @ts-self-types="./wasmbuild.d.ts" -// source-hash: 11e2b826e0a8dd9b89366040adb689e3bccd77ba -import * as wasm from "./wasmbuild_bg.wasm"; -export * from "./wasmbuild_bg.js"; -import { __wbg_set_wasm } from "./wasmbuild_bg.js"; +// source-hash: d5fff448b0ce0d83629b673dbe53bfcbfd1838ba +import * as wasm from "./wasmbuild.wasm"; +export * from "./wasmbuild.internal.js"; +import { __wbg_set_wasm } from "./wasmbuild.internal.js"; __wbg_set_wasm(wasm); diff --git a/lib/wasmbuild.wasm b/lib/wasmbuild.wasm new file mode 100644 index 0000000..f517273 Binary files /dev/null and b/lib/wasmbuild.wasm differ diff --git a/lib/wasmbuild_bg.js b/lib/wasmbuild_bg.js index 57af814..4ff21d4 100644 --- a/lib/wasmbuild_bg.js +++ b/lib/wasmbuild_bg.js @@ -12,27 +12,11 @@ const heap = new Array(128).fill(undefined); heap.push(undefined, null, true, false); -let heap_next = heap.length; - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - heap[idx] = obj; - return idx; +function getObject(idx) { + return heap[idx]; } -const lTextDecoder = typeof TextDecoder === "undefined" - ? (0, module.require)("util").TextDecoder - : TextDecoder; - -let cachedTextDecoder = new lTextDecoder("utf-8", { - ignoreBOM: true, - fatal: true, -}); - -cachedTextDecoder.decode(); +let WASM_VECTOR_LEN = 0; let cachedUint8ArrayMemory0 = null; @@ -45,31 +29,6 @@ function getUint8ArrayMemory0() { return cachedUint8ArrayMemory0; } -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode( - getUint8ArrayMemory0().subarray(ptr, ptr + len), - ); -} - -function getObject(idx) { - return heap[idx]; -} - -function dropObject(idx) { - if (idx < 132) return; - heap[idx] = heap_next; - heap_next = idx; -} - -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} - -let WASM_VECTOR_LEN = 0; - const lTextEncoder = typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder; @@ -127,13 +86,6 @@ function passStringToWasm0(arg, malloc, realloc) { return ptr; } -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1, 1) >>> 0; - getUint8ArrayMemory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} - let cachedDataViewMemory0 = null; function getDataViewMemory0() { @@ -147,6 +99,54 @@ function getDataViewMemory0() { } return cachedDataViewMemory0; } + +const lTextDecoder = typeof TextDecoder === "undefined" + ? (0, module.require)("util").TextDecoder + : TextDecoder; + +let cachedTextDecoder = new lTextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, +}); + +cachedTextDecoder.decode(); + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode( + getUint8ArrayMemory0().subarray(ptr, ptr + len), + ); +} + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8ArrayMemory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; +} /** * @param {string} name * @param {string} ext @@ -183,58 +183,54 @@ export function generate_bindgen(name, ext, wasm_bytes) { } } -export function __wbg_new_e69b5f66fda8f13c() { - const ret = new Object(); - return addHeapObject(ret); +export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { + const ret = String(getObject(arg1)); + const ptr1 = passStringToWasm0( + ret, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } -export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) { - getObject(arg0)[takeObject(arg1)] = takeObject(arg2); +export function __wbg_new_5bd3cfec88bd010e(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); } -export function __wbg_new_034f913e7636e987() { +export function __wbg_new_9e6542cc3fe4b09e() { const ret = new Array(); return addHeapObject(ret); } -export function __wbg_set_425e70f7c64ac962(arg0, arg1, arg2) { - getObject(arg0)[arg1 >>> 0] = takeObject(arg2); -} - -export function __wbg_set_277a63e77c89279f(arg0, arg1, arg2) { - const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); +export function __wbg_new_dbb4955149975b18() { + const ret = new Object(); return addHeapObject(ret); } -export function __wbindgen_number_new(arg0) { - const ret = arg0; +export function __wbg_new_efea5718d1896ea2() { + const ret = new Map(); return addHeapObject(ret); } -export function __wbg_String_b9412f8799faab3e(arg0, arg1) { - const ret = String(getObject(arg1)); - const ptr1 = passStringToWasm0( - ret, - wasm.__wbindgen_malloc, - wasm.__wbindgen_realloc, - ); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); +export function __wbg_set_0ccc5fa791d83f2d(arg0, arg1, arg2) { + getObject(arg0)[arg1 >>> 0] = takeObject(arg2); } -export function __wbg_new_70a2f23d1565c04c(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); +export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); } -export function __wbindgen_string_new(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); +export function __wbg_set_9b8ce78fa3e7ad0e(arg0, arg1, arg2) { + const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); return addHeapObject(ret); } -export function __wbindgen_object_drop_ref(arg0) { - takeObject(arg0); +export function __wbindgen_error_new(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); } export function __wbindgen_is_string(arg0) { @@ -242,8 +238,8 @@ export function __wbindgen_is_string(arg0) { return ret; } -export function __wbindgen_error_new(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); +export function __wbindgen_number_new(arg0) { + const ret = arg0; return addHeapObject(ret); } @@ -252,8 +248,12 @@ export function __wbindgen_object_clone_ref(arg0) { return addHeapObject(ret); } -export function __wbg_new_7a87a0376e40533b() { - const ret = new Map(); +export function __wbindgen_object_drop_ref(arg0) { + takeObject(arg0); +} + +export function __wbindgen_string_new(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); return addHeapObject(ret); } diff --git a/lib/wasmbuild_bg.wasm b/lib/wasmbuild_bg.wasm index 23e3394..fd34cd6 100644 Binary files a/lib/wasmbuild_bg.wasm and b/lib/wasmbuild_bg.wasm differ diff --git a/rs_lib/Cargo.toml b/rs_lib/Cargo.toml index d9dd39e..2d211a2 100644 --- a/rs_lib/Cargo.toml +++ b/rs_lib/Cargo.toml @@ -8,9 +8,9 @@ crate-type = ["cdylib"] [dependencies] anyhow = "=1.0.93" -js-sys = "=0.3.72" +js-sys = "=0.3.77" serde = { version = "1.0.215", features = ["derive", "rc"] } # make sure to update the version in lib/versions.ts to match this version -wasm-bindgen = "=0.2.95" -wasm-bindgen-cli-support = "=0.2.95" +wasm-bindgen = "=0.2.100" +wasm-bindgen-cli-support = "=0.2.100" serde-wasm-bindgen = "=0.6.5"