tqwewe / leptos_server_signal

Leptos server signals synced through websockets
MIT License
58 stars 11 forks source link

Cannot compile examples #3

Closed 124C41p closed 1 year ago

124C41p commented 1 year ago

It seems that the examples have not been upgraded to Leptos 0.3 yet. But even after upgrading manually, I get some kind of linking error when running cargo leptos build regarding to wasm-bindgen.

tqwewe commented 1 year ago

Hi @124C41p I've just updated the dependencies in the examples and they seem to compile okay for me.. Maybe try pulling down the latest changes from main branch and try again?

If it still doesn't work please post what linking errors you're seeing thanks!

124C41p commented 1 year ago

Thanks for updating! Unfortunately, the linking issue remains for me - even after reinstalling my rust toolchain and cargo-leptos. When trying to build the axum-example using cargo leptos build on latest nightly, I get the following error message:

       Cargo finished cargo build --package=axum_example --lib --target-dir=target/front --target=wasm32-unknown-unknown --no-default-features --features=hydrate
Error: at `/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.1.8/src/compile/front.rs:42:30`

Caused by:
    0: at `/home/<username>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.1.8/src/compile/front.rs:108: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.86
            this binary schema version: 0.2.84

       Currently the bindgen format is unstable enough that these two schema versions
       must exactly match. You can accomplish this by either updating the wasm-bindgen
       dependency or this binary.

       You should be able to update the wasm-bindgen dependency with:

           cargo update -p wasm-bindgen

       or you can update the binary with

           cargo install -f wasm-bindgen-cli

       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!
tqwewe commented 1 year ago

It looks like maybe running cargo update in the example directory might solve this, since you have a lock file containing wasm-bindgen 0.2.84

tqwewe commented 1 year ago

Ah it seems like we actually need to se wasm-bindgen to =0.2.84 for now. https://github.com/leptos-rs/leptos/issues/1051#issuecomment-1550539377

tqwewe commented 1 year ago

Seems to be resolved. https://github.com/leptos-rs/leptos/issues/1051#issuecomment-1586197897