Skip to content

Upgrade wasm-bindgen v0.2.88 to 0.2.93 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hobson
Copy link

@hobson hobson commented Nov 3, 2024

The latest Nov 2, 2024 target wasm-unknown-unknown binary for the itehax-website crate was built wasm-bindgen version 0.2.93 and the 0.2.88 requirement in Cargo.toml will upgrade wasm-bindgen to 0.2.95 making it incompatible with the current version of the target WASM binary for leptos.
So I needed to add the precise pinned version of wasm-bindgen to Cargo.toml and do a cargo clean before cargo leptos watch would stop displaying this wasm-bindgen error message. The message should also add instructions for fixing/pinning your Cargo.toml version of wasm-bindgen:

   Compiling itehax-website v0.1.0 (/home/hobs/code/hobs/rust-blog)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 26.38s
       Cargo finished cargo build --package=itehax-website --lib --target-dir=/home/hobs/code/hobs/rust-blog/target/front --target=wasm32-unknown-unknown --no-default-features --features=hydrate
       Front compiling WASM
Error: at `/home/hobs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.20/src/compile/front.rs:50:30`

Caused by:
    0: at `/home/hobs/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.20/src/compile/front.rs:125:10`
    1: 
       
       it looks like the Rust project used to create this wasm file was linked against
       version of wasm-bindgen that uses a different bindgen format than this binary:
       
         rust wasm file schema version: 0.2.95
            this binary schema version: 0.2.93
       
       Currently the bindgen format is unstable enough that these two schema versions
       must exactly match. You can accomplish this by either updating this binary or
       the wasm-bindgen dependency in the Rust project.
       
       You should be able to update the wasm-bindgen dependency with:
       
           cargo update -p wasm-bindgen --precise 0.2.93
       
       don't forget to recompile your wasm file! Alternatively, you can update the
       binary with:
       
           cargo install -f wasm-bindgen-cli --version 0.2.95
       
       if this warning fails to go away though and you're not sure what to do feel free
       to open an issue at https://github.com/rustwasm/wasm-bindgen/issues!

…om 0.2.95 so it's compatible with target wasm-unknown-unknown. IMPORTANT: must have "= " inside quotes before version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant