diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc5e56c..c464638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: steps: - name: clone repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Rust uses: dsherret/rust-toolchain-file@v1 diff --git a/Cargo.lock b/Cargo.lock index d36671d..dcc22b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,9 +172,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -387,9 +387,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03794299fa80bda34aef2784a496c6440fbc75fb1977c4e05750ddcd617e5a09" +checksum = "2be60cf36510aa4702ce189517229c3091f4a322a5ec2665a7737ea5956c2b3a" dependencies = [ "anyhow", "base64", @@ -405,9 +405,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -415,9 +415,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", @@ -428,9 +428,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] diff --git a/deno.json b/deno.json index fa77620..da8fb73 100644 --- a/deno.json +++ b/deno.json @@ -19,7 +19,7 @@ }, "tasks": { "fmt": "deno fmt && cargo fmt", - "build": "cargo install wasm-bindgen-cli --version 0.2.106 --locked && WASMBUILD_BINDGEN_UPGRADE=1 deno run -A ./main.ts -p wasmbuild", + "build": "cargo install wasm-bindgen-cli --version 0.2.108 --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 f2c8349..ff450cb 100644 --- a/lib/versions.ts +++ b/lib/versions.ts @@ -6,10 +6,10 @@ interface WasmCrate { } export const versions = { - "wasm-bindgen": "0.2.106", - "wasm-bindgen-futures": "0.4.56", - "js-sys": "0.3.83", - "web-sys": "0.3.83", + "wasm-bindgen": "0.2.108", + "wasm-bindgen-futures": "0.4.58", + "js-sys": "0.3.85", + "web-sys": "0.3.85", } as const; export function verifyVersions(crate: WasmCrate) { diff --git a/lib/wasmbuild.js b/lib/wasmbuild.js index 81f3582..e42a4bb 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: d191f1a910caf8cc420de41ad5000f22e50a1473 +// source-hash: 17a2042a1ed2f9e568a4ce18dadd6c1e21c9ac5b 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 82ba8c7..124b2f8 100644 --- a/lib/wasmbuild_bg.js +++ b/lib/wasmbuild_bg.js @@ -3,11 +3,100 @@ // deno-lint-ignore-file // deno-fmt-ignore-file -let wasm; -export function __wbg_set_wasm(val) { - wasm = val; +/** + * @param {string} name + * @param {string} ext + * @param {Uint8Array} wasm_bytes + * @returns {any} + */ +export function generate_bindgen(name, ext, wasm_bytes) { + 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; + const ret = wasm.generate_bindgen(ptr0, len0, ptr1, len1, ptr2, len2); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return takeFromExternrefTable0(ret[0]); +} +export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) { + const ret = Error(getStringFromWasm0(arg0, arg1)); + return ret; +} +export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { + const ret = String(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___wbindgen_is_string_cd444516edc5b180(arg0) { + const ret = typeof arg0 === "string"; + return ret; +} +export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +} +export function __wbg_new_361308b2356cecd0() { + const ret = new Object(); + return ret; +} +export function __wbg_new_3eb36ae241fe6f44() { + const ret = new Array(); + return ret; +} +export function __wbg_new_72b49615380db768(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return ret; +} +export function __wbg_new_dca287b076112a51() { + const ret = new Map(); + return ret; +} +export function __wbg_set_1eb0999cf5d27fc8(arg0, arg1, arg2) { + const ret = arg0.set(arg1, arg2); + return ret; +} +export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { + arg0[arg1] = arg2; +} +export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) { + arg0[arg1 >>> 0] = arg2; +} +export function __wbindgen_cast_0000000000000001(arg0) { + // Cast intrinsic for `F64 -> Externref`. + const ret = arg0; + return ret; +} +export function __wbindgen_cast_0000000000000002(arg0, arg1) { + // Cast intrinsic for `Ref(String) -> Externref`. + const ret = getStringFromWasm0(arg0, arg1); + return ret; +} +export function __wbindgen_init_externref_table() { + const table = wasm.__wbindgen_externrefs; + const offset = table.grow(4); + table.set(0, undefined); + table.set(offset + 0, undefined); + table.set(offset + 1, null); + table.set(offset + 2, true); + table.set(offset + 3, false); } - let cachedDataViewMemory0 = null; function getDataViewMemory0() { if ( @@ -123,111 +212,7 @@ if (!("encodeInto" in cachedTextEncoder)) { let WASM_VECTOR_LEN = 0; -/** - * @param {string} name - * @param {string} ext - * @param {Uint8Array} wasm_bytes - * @returns {any} - */ -export function generate_bindgen(name, ext, wasm_bytes) { - 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; - const ret = wasm.generate_bindgen(ptr0, len0, ptr1, len1, ptr2, len2); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return takeFromExternrefTable0(ret[0]); -} - -export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) { - const ret = Error(getStringFromWasm0(arg0, arg1)); - return ret; -} - -export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) { - const ret = String(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___wbindgen_is_string_704ef9c8fc131030(arg0) { - const ret = typeof arg0 === "string"; - return ret; -} - -export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); -} - -export function __wbg_new_1ba21ce319a06297() { - const ret = new Object(); - return ret; -} - -export function __wbg_new_25f239778d6112b9() { - const ret = new Array(); - return ret; -} - -export function __wbg_new_b546ae120718850e() { - const ret = new Map(); - return ret; -} - -export function __wbg_new_df1173567d5ff028(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - return ret; -} - -export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) { - arg0[arg1] = arg2; -} - -export function __wbg_set_7df433eea03a5c14(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) { - // Cast intrinsic for `Ref(String) -> Externref`. - const ret = getStringFromWasm0(arg0, arg1); - return ret; -} - -export function __wbindgen_cast_d6cd19b81560fd6e(arg0) { - // Cast intrinsic for `F64 -> Externref`. - const ret = arg0; - return ret; -} - -export function __wbindgen_init_externref_table() { - const table = wasm.__wbindgen_externrefs; - const offset = table.grow(4); - table.set(0, undefined); - table.set(offset + 0, undefined); - table.set(offset + 1, null); - table.set(offset + 2, true); - table.set(offset + 3, false); +let wasm; +export function __wbg_set_wasm(val) { + wasm = val; } diff --git a/lib/wasmbuild_bg.wasm b/lib/wasmbuild_bg.wasm index fcf5a02..8c6a355 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 892e89b..eac646c 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.83" +js-sys = "=0.3.85" 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.106" -wasm-bindgen-cli-support = "=0.2.106" +wasm-bindgen = "=0.2.108" +wasm-bindgen-cli-support = "=0.2.108" serde-wasm-bindgen = "=0.6.5" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 1b4cfd3..03815f7 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" start = [] [dependencies] -wasm-bindgen = "0.2.106" +wasm-bindgen = "0.2.108" [lib] name = "deno_test"