diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfcf0d7..f8c6d3d 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.100 --locked + run: cargo install wasm-bindgen-cli --version 0.2.101 --locked - name: Check Wasm up-to-date run: deno task build --check diff --git a/Cargo.lock b/Cargo.lock index 51abe57..f471347 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ahash" @@ -16,9 +16,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "autocfg" @@ -32,12 +32,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.4.1" @@ -100,28 +94,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" -dependencies = [ - "libc", - "windows-sys", -] - [[package]] name = "fallible-iterator" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - [[package]] name = "gimli" version = "0.26.2" @@ -199,9 +177,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ "once_cell", "wasm-bindgen", @@ -213,18 +191,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" - [[package]] name = "log" version = "0.4.20" @@ -275,34 +241,12 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustix" -version = "0.38.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "rustversion" version = "1.0.19" @@ -380,19 +324,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "tempfile" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys", -] - [[package]] name = "unicode-ident" version = "1.0.12" @@ -436,21 +367,22 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", @@ -462,42 +394,27 @@ dependencies = [ [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e1a4a49abe9cd6f762fc65fac2ef5732afeeb66be369d2f71a85b165a533cf" +checksum = "861a035764c5019d0f7452ebe8bf4b291930200f78393476f72c45d5c427e8be" dependencies = [ "anyhow", "base64", + "leb128", "log", "rustc-demangle", "serde", "serde_json", - "tempfile", "walrus", - "wasm-bindgen-externref-xform", - "wasm-bindgen-multi-value-xform", "wasm-bindgen-shared", - "wasm-bindgen-threads-xform", - "wasm-bindgen-wasm-conventions", - "wasm-bindgen-wasm-interpreter", -] - -[[package]] -name = "wasm-bindgen-externref-xform" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940542c5cdbe96c35f98b5da5c65fb9d18df55a0cb1d81fc5ca4acc4fda4d61c" -dependencies = [ - "anyhow", - "walrus", - "wasm-bindgen-wasm-conventions", + "wasmparser", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -505,9 +422,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", @@ -516,62 +433,15 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-multi-value-xform" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b5ad2e97adde0c3e4369c38e0dbaee329ad8f6cc2ee8e01d1d0b13bd8b14cf" -dependencies = [ - "anyhow", - "walrus", - "wasm-bindgen-wasm-conventions", -] - [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-bindgen-threads-xform" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cbdf2d55a50f7edc9dd9aecae7a3a40e9736fda851bd8816f98a86167c8c277" -dependencies = [ - "anyhow", - "walrus", - "wasm-bindgen-wasm-conventions", -] - -[[package]] -name = "wasm-bindgen-wasm-conventions" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c24fcaa34d2d84407122cfb1d3f37c3586756cf462be18e049b49245a16c08" -dependencies = [ - "anyhow", - "leb128", - "log", - "walrus", - "wasmparser", -] - -[[package]] -name = "wasm-bindgen-wasm-interpreter" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33f24921401faadd6944206f9d6837d07bbb5ff766ed51ad34528089f66550e0" -dependencies = [ - "anyhow", - "log", - "walrus", - "wasm-bindgen-wasm-conventions", -] - [[package]] name = "wasm-encoder" version = "0.214.0" @@ -600,79 +470,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" dependencies = [ "ahash", - "bitflags 2.4.1", + "bitflags", "hashbrown 0.14.5", "indexmap 2.6.0", "semver", "serde", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "zerocopy" version = "0.7.35" diff --git a/lib/versions.ts b/lib/versions.ts index 0a8403a..0388048 100644 --- a/lib/versions.ts +++ b/lib/versions.ts @@ -6,10 +6,10 @@ interface WasmCrate { } export const versions = { - "wasm-bindgen": "0.2.100", - "wasm-bindgen-futures": "0.4.50", - "js-sys": "0.3.77", - "web-sys": "0.3.77", + "wasm-bindgen": "0.2.101", + "wasm-bindgen-futures": "0.4.51", + "js-sys": "0.3.78", + "web-sys": "0.3.78", } as const; export function verifyVersions(crate: WasmCrate) { diff --git a/lib/wasmbuild.js b/lib/wasmbuild.js index 5e8dbd3..ec9789d 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: 83d37b1995d7d2a25021c644fccb57e2aa5331d6 +// source-hash: 0a4f48c6e71550c8c051297d7a7cd0864dd06f55 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 315fd58..337b6a9 100644 --- a/lib/wasmbuild_bg.js +++ b/lib/wasmbuild_bg.js @@ -8,8 +8,6 @@ export function __wbg_set_wasm(val) { wasm = val; } -let WASM_VECTOR_LEN = 0; - let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { @@ -21,11 +19,46 @@ function getUint8ArrayMemory0() { return cachedUint8ArrayMemory0; } +const lTextDecoder = typeof TextDecoder === "undefined" + ? (0, module.require)("util").TextDecoder + : TextDecoder; + +let cachedTextDecoder = new lTextDecoder("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 lTextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, + }); + cachedTextDecoder.decode(); + numBytesDecoded = len; + } + return cachedTextDecoder.decode( + getUint8ArrayMemory0().subarray(ptr, ptr + len), + ); +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return decodeText(ptr, len); +} + +let WASM_VECTOR_LEN = 0; + const lTextEncoder = typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder; -let cachedTextEncoder = new lTextEncoder("utf-8"); +const cachedTextEncoder = new lTextEncoder("utf-8"); const encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function (arg, view) { @@ -92,24 +125,6 @@ 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), - ); -} - function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1, 1) >>> 0; getUint8ArrayMemory0().set(arg, ptr / 1); @@ -150,6 +165,11 @@ export function generate_bindgen(name, ext, wasm_bytes) { return takeFromExternrefTable0(ret[0]); } +export function __wbg_Error_0497d5bdba9362e5(arg0, arg1) { + const ret = Error(getStringFromWasm0(arg0, arg1)); + return ret; +} + export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { const ret = String(arg1); const ptr1 = passStringToWasm0( @@ -162,41 +182,36 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } -export function __wbg_new_405e22f390576ce2() { +export function __wbg_new_07b483f72211fd66() { const ret = new Object(); return ret; } -export function __wbg_new_5e0be73521bc8c17() { - const ret = new Map(); +export function __wbg_new_476169e6d59f23ae(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); return ret; } -export function __wbg_new_78feb108b6472713() { +export function __wbg_new_58353953ad2097cc() { const ret = new Array(); return ret; } -export function __wbg_new_c68d7209be747379(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); +export function __wbg_new_a979b4b45bd55c7f() { + const ret = new Map(); return ret; } -export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) { - arg0[arg1 >>> 0] = arg2; -} - export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { arg0[arg1] = arg2; } -export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) { - const ret = arg0.set(arg1, arg2); - return ret; +export function __wbg_set_7422acbe992d64ab(arg0, arg1, arg2) { + arg0[arg1 >>> 0] = arg2; } -export function __wbindgen_error_new(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); +export function __wbg_set_d6bdfd275fb8a4ce(arg0, arg1, arg2) { + const ret = arg0.set(arg1, arg2); return ret; } diff --git a/lib/wasmbuild_bg.wasm b/lib/wasmbuild_bg.wasm index 884915d..8f7599d 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 2d211a2..7a927c6 100644 --- a/rs_lib/Cargo.toml +++ b/rs_lib/Cargo.toml @@ -7,10 +7,10 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -anyhow = "=1.0.93" -js-sys = "=0.3.77" +anyhow = "=1.0.99" +js-sys = "=0.3.78" 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.100" -wasm-bindgen-cli-support = "=0.2.100" +wasm-bindgen = "=0.2.101" +wasm-bindgen-cli-support = "=0.2.101" serde-wasm-bindgen = "=0.6.5"