diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b23ac2f..cc5e56c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,6 @@ jobs: if: contains(matrix.os, 'ubuntu') run: deno lint && cargo clippy - - name: Install wasm-bindgen-cli - 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 e3abcfd..d36671d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "anyhow" version = "1.0.93" @@ -22,9 +10,9 @@ checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "base64" @@ -34,21 +22,21 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "crossbeam-deque" @@ -84,15 +72,15 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "fallible-iterator" @@ -123,16 +111,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "serde", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -145,9 +123,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -176,27 +154,27 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "serde", "serde_core", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.82" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -216,39 +194,45 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "log" -version = "0.4.20" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "once_cell" -version = "1.18.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -256,9 +240,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -266,27 +250,21 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[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" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" @@ -331,26 +309,28 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" dependencies = [ "itoa", - "ryu", + "memchr", "serde", + "serde_core", + "zmij", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "syn" -version = "2.0.89" +version = "2.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4" dependencies = [ "proc-macro2", "quote", @@ -359,15 +339,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "walrus" @@ -383,7 +357,7 @@ dependencies = [ "rayon", "walrus-macro", "wasm-encoder", - "wasmparser 0.240.0", + "wasmparser", ] [[package]] @@ -400,9 +374,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -413,9 +387,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3f73cd40cc5c6adf6a090e331f24595f87e7a5bd70ccf3db46be0e1d6e0d92" +checksum = "03794299fa80bda34aef2784a496c6440fbc75fb1977c4e05750ddcd617e5a09" dependencies = [ "anyhow", "base64", @@ -426,14 +400,14 @@ dependencies = [ "serde_json", "walrus", "wasm-bindgen-shared", - "wasmparser 0.214.0", + "wasmparser", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -441,9 +415,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", "proc-macro2", @@ -454,9 +428,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] @@ -468,7 +442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06d642d8c5ecc083aafe9ceb32809276a304547a3a6eeecceb5d8152598bc71f" dependencies = [ "leb128fmt", - "wasmparser 0.240.0", + "wasmparser", ] [[package]] @@ -483,20 +457,6 @@ dependencies = [ "wasm-bindgen-cli-support", ] -[[package]] -name = "wasmparser" -version = "0.214.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" -dependencies = [ - "ahash", - "bitflags", - "hashbrown 0.14.5", - "indexmap 2.12.0", - "semver", - "serde", -] - [[package]] name = "wasmparser" version = "0.240.0" @@ -505,27 +465,13 @@ checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4" dependencies = [ "bitflags", "hashbrown 0.15.5", - "indexmap 2.12.0", + "indexmap 2.12.1", "semver", "serde", ] [[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" +name = "zmij" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" diff --git a/deno.json b/deno.json index d014650..fa77620 100644 --- a/deno.json +++ b/deno.json @@ -19,7 +19,7 @@ }, "tasks": { "fmt": "deno fmt && cargo fmt", - "build": "WASMBUILD_BINDGEN_UPGRADE=1 deno run -A ./main.ts -p wasmbuild", + "build": "cargo install wasm-bindgen-cli --version 0.2.106 --locked && WASMBUILD_BINDGEN_UPGRADE=1 deno run -A ./main.ts -p wasmbuild", "build:lkg": "deno run -A jsr:@deno/wasmbuild@^0.15.4 -p wasmbuild", "test": "cd tests && rm -rf lib lib_out_js_file lib_inline lib_no_cache && deno task test:main && deno task test:js-ext && deno task test:inline && deno test -A && deno task test:check && deno task test:start && deno task test:start-inline", "test:main": "cd tests && deno run -A ../main.ts -p deno_test", diff --git a/lib/versions.ts b/lib/versions.ts index e91eed2..f2c8349 100644 --- a/lib/versions.ts +++ b/lib/versions.ts @@ -6,10 +6,10 @@ interface WasmCrate { } export const versions = { - "wasm-bindgen": "0.2.105", - "wasm-bindgen-futures": "0.4.55", - "js-sys": "0.3.82", - "web-sys": "0.3.82", + "wasm-bindgen": "0.2.106", + "wasm-bindgen-futures": "0.4.56", + "js-sys": "0.3.83", + "web-sys": "0.3.83", } as const; export function verifyVersions(crate: WasmCrate) { diff --git a/lib/wasmbuild.js b/lib/wasmbuild.js index 56b8f69..81f3582 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: 5a933c5f7e80aad0dbb29f1b6f7a4de52dc62bf5 +// source-hash: d191f1a910caf8cc420de41ad5000f22e50a1473 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 65ecf59..82ba8c7 100644 --- a/lib/wasmbuild_bg.js +++ b/lib/wasmbuild_bg.js @@ -8,39 +8,17 @@ export function __wbg_set_wasm(val) { wasm = val; } -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { +let cachedDataViewMemory0 = null; +function getDataViewMemory0() { if ( - cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0 + cachedDataViewMemory0 === null || + cachedDataViewMemory0.buffer.detached === true || + (cachedDataViewMemory0.buffer.detached === undefined && + cachedDataViewMemory0.buffer !== wasm.memory.buffer) ) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -let cachedTextDecoder = new TextDecoder("utf-8", { - ignoreBOM: true, - fatal: true, -}); - -cachedTextDecoder.decode(); - -const MAX_SAFARI_DECODE_BYTES = 2146435072; -let numBytesDecoded = 0; -function decodeText(ptr, len) { - numBytesDecoded += len; - if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { - cachedTextDecoder = new TextDecoder("utf-8", { - ignoreBOM: true, - fatal: true, - }); - cachedTextDecoder.decode(); - numBytesDecoded = len; + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } - return cachedTextDecoder.decode( - getUint8ArrayMemory0().subarray(ptr, ptr + len), - ); + return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { @@ -48,19 +26,21 @@ function getStringFromWasm0(ptr, len) { return decodeText(ptr, len); } -let WASM_VECTOR_LEN = 0; - -const cachedTextEncoder = new TextEncoder(); +let cachedUint8ArrayMemory0 = null; +function getUint8ArrayMemory0() { + if ( + cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0 + ) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} -if (!("encodeInto" in cachedTextEncoder)) { - cachedTextEncoder.encodeInto = function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length, - }; - }; +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8ArrayMemory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; } function passStringToWasm0(arg, malloc, realloc) { @@ -84,7 +64,6 @@ function passStringToWasm0(arg, malloc, realloc) { if (code > 0x7F) break; mem[ptr + offset] = code; } - if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); @@ -101,32 +80,49 @@ function passStringToWasm0(arg, malloc, realloc) { return ptr; } -let cachedDataViewMemory0 = null; +function takeFromExternrefTable0(idx) { + const value = wasm.__wbindgen_externrefs.get(idx); + wasm.__externref_table_dealloc(idx); + return value; +} -function getDataViewMemory0() { - if ( - cachedDataViewMemory0 === null || - cachedDataViewMemory0.buffer.detached === true || - (cachedDataViewMemory0.buffer.detached === undefined && - cachedDataViewMemory0.buffer !== wasm.memory.buffer) - ) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); +let cachedTextDecoder = new TextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, +}); +cachedTextDecoder.decode(); +const MAX_SAFARI_DECODE_BYTES = 2146435072; +let numBytesDecoded = 0; +function decodeText(ptr, len) { + numBytesDecoded += len; + if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { + cachedTextDecoder = new TextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, + }); + cachedTextDecoder.decode(); + numBytesDecoded = len; } - return cachedDataViewMemory0; + return cachedTextDecoder.decode( + getUint8ArrayMemory0().subarray(ptr, ptr + len), + ); } -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1, 1) >>> 0; - getUint8ArrayMemory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} +const cachedTextEncoder = new TextEncoder(); -function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_externrefs.get(idx); - wasm.__externref_table_dealloc(idx); - return value; +if (!("encodeInto" in cachedTextEncoder)) { + cachedTextEncoder.encodeInto = function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length, + }; + }; } + +let WASM_VECTOR_LEN = 0; + /** * @param {string} name * @param {string} ext @@ -155,7 +151,7 @@ export function generate_bindgen(name, ext, wasm_bytes) { return takeFromExternrefTable0(ret[0]); } -export function __wbg_Error_e83987f665cf5504(arg0, arg1) { +export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } @@ -172,32 +168,32 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } -export function __wbg___wbindgen_is_string_fbb76cb2940daafd(arg0) { +export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) { const ret = typeof arg0 === "string"; return ret; } -export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) { +export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } -export function __wbg_new_1acc0b6eea89d040() { +export function __wbg_new_1ba21ce319a06297() { const ret = new Object(); return ret; } -export function __wbg_new_68651c719dcda04e() { - const ret = new Map(); +export function __wbg_new_25f239778d6112b9() { + const ret = new Array(); return ret; } -export function __wbg_new_a7442b4b19c1a356(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); +export function __wbg_new_b546ae120718850e() { + const ret = new Map(); return ret; } -export function __wbg_new_e17d9f43105b08be() { - const ret = new Array(); +export function __wbg_new_df1173567d5ff028(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); return ret; } @@ -205,13 +201,13 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { arg0[arg1] = arg2; } -export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) { - const ret = arg0.set(arg1, arg2); - return ret; +export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) { + arg0[arg1 >>> 0] = arg2; } -export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) { - arg0[arg1 >>> 0] = arg2; +export function __wbg_set_efaaf145b9377369(arg0, arg1, arg2) { + const ret = arg0.set(arg1, arg2); + return ret; } export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) { diff --git a/lib/wasmbuild_bg.wasm b/lib/wasmbuild_bg.wasm index f794a0b..fcf5a02 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 60300e0..892e89b 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.82" +js-sys = "=0.3.83" 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.105" -wasm-bindgen-cli-support = "=0.2.105" +wasm-bindgen = "=0.2.106" +wasm-bindgen-cli-support = "=0.2.106" serde-wasm-bindgen = "=0.6.5" diff --git a/rs_lib/src/lib.rs b/rs_lib/src/lib.rs index 9cf0119..943a950 100644 --- a/rs_lib/src/lib.rs +++ b/rs_lib/src/lib.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::collections::HashMap; use anyhow::bail; @@ -30,7 +31,7 @@ pub struct BindgenBytesFileOutput { pub struct Output { pub js_bg: BindgenTextFileOutput, pub ts: Option, - pub snippets: HashMap>, + pub snippets: BTreeMap>, pub local_modules: HashMap, pub start: Option, pub wasm: BindgenBytesFileOutput, diff --git a/tests/Cargo.toml b/tests/Cargo.toml index d4f50c4..1b4cfd3 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" start = [] [dependencies] -wasm-bindgen = "0.2.105" +wasm-bindgen = "0.2.106" [lib] name = "deno_test"