diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 032e6f7..b23ac2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: run: deno lint && cargo clippy - name: Install wasm-bindgen-cli - run: cargo install wasm-bindgen-cli --version 0.2.102 --locked + run: cargo install wasm-bindgen-cli --version 0.2.105 --locked - name: Check Wasm up-to-date run: deno task build --check diff --git a/Cargo.lock b/Cargo.lock index d795ff8..e3abcfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -100,6 +100,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "gimli" version = "0.26.2" @@ -129,9 +135,19 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heck" @@ -160,13 +176,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.15.1", + "hashbrown 0.16.0", "serde", + "serde_core", ] [[package]] @@ -177,9 +194,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.79" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6247da8b8658ad4e73a186e747fcc5fc2a29f979d6fe6269127fdb5fd08298d0" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ "once_cell", "wasm-bindgen", @@ -191,6 +208,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "log" version = "0.4.20" @@ -267,10 +290,11 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ + "serde_core", "serde_derive", ] @@ -285,11 +309,20 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -338,9 +371,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walrus" -version = "0.23.3" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6481311b98508f4bc2d0abbfa5d42172e7a54b4b24d8f15e28b0dc650be0c59f" +checksum = "ff282e73d21b86a9d397f42570d158eb9e5c521d0ead4d13cd049fd7cb45c467" dependencies = [ "anyhow", "gimli", @@ -350,14 +383,14 @@ dependencies = [ "rayon", "walrus-macro", "wasm-encoder", - "wasmparser", + "wasmparser 0.240.0", ] [[package]] name = "walrus-macro" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ad39ff894c43c9649fa724cdde9a6fc50b855d517ef071a93e5df82fe51d3" +checksum = "0ef06db404cbaed87cb25fd2ca3a62502af485f43383c9641ffcf1479d02fffd" dependencies = [ "heck", "proc-macro2", @@ -367,9 +400,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.102" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad224d2776649cfb4f4471124f8176e54c1cca67a88108e30a0cd98b90e7ad3" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", "once_cell", @@ -378,25 +411,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1364104bdcd3c03f22b16a3b1c9620891469f5e9f09bc38b2db121e593e732" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.102" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e0a850e4110534f60b9047ca2da0556063bd5a70ea7928671df16796265f41" +checksum = "0d3f73cd40cc5c6adf6a090e331f24595f87e7a5bd70ccf3db46be0e1d6e0d92" dependencies = [ "anyhow", "base64", @@ -407,14 +426,14 @@ dependencies = [ "serde_json", "walrus", "wasm-bindgen-shared", - "wasmparser", + "wasmparser 0.214.0", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.102" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d7ab4ca3e367bb1ed84ddbd83cc6e41e115f8337ed047239578210214e36c76" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -422,33 +441,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.102" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a518014843a19e2dbbd0ed5dfb6b99b23fb886b14e6192a00803a3e14c552b0" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.102" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255eb0aa4cc2eea3662a00c2bbd66e93911b7361d5e0fcd62385acfd7e15dcee" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-encoder" -version = "0.214.0" +version = "0.240.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff694f02a8d7a50b6922b197ae03883fbf18cdb2ae9fbee7b6148456f5f44041" +checksum = "06d642d8c5ecc083aafe9ceb32809276a304547a3a6eeecceb5d8152598bc71f" dependencies = [ - "leb128", + "leb128fmt", + "wasmparser 0.240.0", ] [[package]] @@ -472,7 +492,20 @@ dependencies = [ "ahash", "bitflags", "hashbrown 0.14.5", - "indexmap 2.6.0", + "indexmap 2.12.0", + "semver", + "serde", +] + +[[package]] +name = "wasmparser" +version = "0.240.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap 2.12.0", "semver", "serde", ] diff --git a/lib/versions.ts b/lib/versions.ts index e7cb7ca..e91eed2 100644 --- a/lib/versions.ts +++ b/lib/versions.ts @@ -6,10 +6,10 @@ interface WasmCrate { } export const versions = { - "wasm-bindgen": "0.2.102", - "wasm-bindgen-futures": "0.4.52", - "js-sys": "0.3.79", - "web-sys": "0.3.79", + "wasm-bindgen": "0.2.105", + "wasm-bindgen-futures": "0.4.55", + "js-sys": "0.3.82", + "web-sys": "0.3.82", } as const; export function verifyVersions(crate: WasmCrate) { diff --git a/lib/wasmbuild.js b/lib/wasmbuild.js index 6a9622a..56b8f69 100644 --- a/lib/wasmbuild.js +++ b/lib/wasmbuild.js @@ -4,7 +4,7 @@ // deno-fmt-ignore-file // @ts-self-types="./wasmbuild.d.ts" -// source-hash: bbff2cc4e83c1ecb22d833d2350ef63ed1fe1514 +// source-hash: 5a933c5f7e80aad0dbb29f1b6f7a4de52dc62bf5 import * as wasm from "./wasmbuild_bg.wasm"; export * from "./wasmbuild_bg.js"; import { __wbg_set_wasm } from "./wasmbuild_bg.js"; diff --git a/lib/wasmbuild_bg.js b/lib/wasmbuild_bg.js index af7140e..65ecf59 100644 --- a/lib/wasmbuild_bg.js +++ b/lib/wasmbuild_bg.js @@ -19,11 +19,7 @@ function getUint8ArrayMemory0() { return cachedUint8ArrayMemory0; } -const lTextDecoder = typeof TextDecoder === "undefined" - ? (0, module.require)("util").TextDecoder - : TextDecoder; - -let cachedTextDecoder = new lTextDecoder("utf-8", { +let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true, }); @@ -35,7 +31,7 @@ let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { - cachedTextDecoder = new lTextDecoder("utf-8", { + cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true, }); @@ -54,17 +50,10 @@ function getStringFromWasm0(ptr, len) { let WASM_VECTOR_LEN = 0; -const lTextEncoder = typeof TextEncoder === "undefined" - ? (0, module.require)("util").TextEncoder - : TextEncoder; - -const cachedTextEncoder = new lTextEncoder("utf-8"); +const cachedTextEncoder = new TextEncoder(); -const encodeString = typeof cachedTextEncoder.encodeInto === "function" - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); - } - : function (arg, view) { +if (!("encodeInto" in cachedTextEncoder)) { + cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { @@ -72,6 +61,7 @@ const encodeString = typeof cachedTextEncoder.encodeInto === "function" written: buf.length, }; }; +} function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { @@ -101,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) { } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); + const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; @@ -133,7 +123,7 @@ function passArray8ToWasm0(arg, malloc) { } function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_export_2.get(idx); + const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } @@ -165,7 +155,7 @@ export function generate_bindgen(name, ext, wasm_bytes) { return takeFromExternrefTable0(ret[0]); } -export function __wbg_Error_90f14b053b2af32f(arg0, arg1) { +export function __wbg_Error_e83987f665cf5504(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } @@ -182,46 +172,46 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } -export function __wbg_new_1b925e0c0e1d30ba() { +export function __wbg___wbindgen_is_string_fbb76cb2940daafd(arg0) { + const ret = typeof arg0 === "string"; + return ret; +} + +export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +} + +export function __wbg_new_1acc0b6eea89d040() { const ret = new Object(); return ret; } -export function __wbg_new_3c48ee6a683248da() { +export function __wbg_new_68651c719dcda04e() { const ret = new Map(); return ret; } -export function __wbg_new_7c134f9c83abf3a4(arg0, arg1) { +export function __wbg_new_a7442b4b19c1a356(arg0, arg1) { const ret = new Error(getStringFromWasm0(arg0, arg1)); return ret; } -export function __wbg_new_d8a154d0939e6bb4() { +export function __wbg_new_e17d9f43105b08be() { const ret = new Array(); return ret; } -export function __wbg_set_038a8a067d895c6a(arg0, arg1, arg2) { - arg0[arg1 >>> 0] = arg2; -} - export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { arg0[arg1] = arg2; } -export function __wbg_set_a15b7b524330d4f1(arg0, arg1, arg2) { +export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) { const ret = arg0.set(arg1, arg2); return ret; } -export function __wbg_wbindgenisstring_55b63daa584dc807(arg0) { - const ret = typeof arg0 === "string"; - return ret; -} - -export function __wbg_wbindgenthrow_681185b504fabc8e(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); +export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) { + arg0[arg1 >>> 0] = arg2; } export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) { @@ -237,7 +227,7 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) { } export function __wbindgen_init_externref_table() { - const table = wasm.__wbindgen_export_2; + const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); diff --git a/lib/wasmbuild_bg.wasm b/lib/wasmbuild_bg.wasm index 3ec3bb8..f794a0b 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 847114e..60300e0 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.79" +js-sys = "=0.3.82" 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.102" -wasm-bindgen-cli-support = "=0.2.102" +wasm-bindgen = "=0.2.105" +wasm-bindgen-cli-support = "=0.2.105" serde-wasm-bindgen = "=0.6.5" diff --git a/tests/.gitignore b/tests/.gitignore index 0795843..c31bcaf 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -2,3 +2,4 @@ target/ lib_out_js_file lib_inline lib +lib_sync diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 45bd3d5..d4f50c4 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" start = [] [dependencies] -wasm-bindgen = "0.2.90" +wasm-bindgen = "0.2.105" [lib] name = "deno_test"