Skip to content

Warnings and unexpected behaviour in islands_router example - v0.8.0-rc3 #3896

Open
@NCura

Description

@NCura

I'm interested in using client-side routing with islands so I was excited when reading the release notes of v0.8.0. I've clone the leptos project, entered a shell using the flake.nix, and when trying to cargo leptos watch the islands_router example, it compiles, but there are various warnings:

warning: this function definition involves an argument of type `()` which is affected by the wasm ABI transition
   --> /home/nicolas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasm-bindgen-0.2.100/src/closure.rs:749:1
    |
749 | / doit! {
750 | |     ()
751 | |     (A a1 a2 a3 a4)
752 | |     (A a1 a2 a3 a4 B b1 b2 b3 b4)
...   |
758 | |     (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4 G g1 g2 g3 g4 H h1 h2 h3 h4)
759 | | }
    | |_^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
    = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target
    = note: `#[warn(wasm_c_abi)]` on by default
    = note: this warning originates in the macro `doit` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: `tachys` (lib) generated 2 warnings
warning: `auto` traits are unstable
   --> /home/nicolas/projects/leptos/leptos-project/router/src/params.rs:208:5
    |
208 |     auto trait NotOption {}
    |     ^^^^
    |
    = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
    = help: add `#![feature(auto_traits)]` to the crate attributes to enable
    = note: this compiler was built on 2025-04-04; consider upgrading it if it is out of date
    = warning: unstable syntax can change at any point in the future, causing a hard error!
    = note: for more information, see issue #65860 <https://github.com/rust-lang/rust/issues/65860>
warning: `leptos_router` (lib) generated 1 warning
warning: this function definition involves an argument of type `()` which is affected by the wasm ABI transition
   --> src/app.rs:204:1
    |
204 | #[island]
    | ^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #138762 <https://github.com/rust-lang/rust/issues/138762>
    = help: the "C" ABI Rust uses on wasm32-unknown-unknown will change to align with the standard "C" ABI for this target
    = note: `#[warn(wasm_c_abi)]` on by default
    = note: this warning originates in the attribute macro `::leptos::wasm_bindgen::prelude::wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

A part from those warnings, I'm getting an unexpected behaviour when trying the example in the browser:

  • I go to http://127.0.0.1:3009
  • I see the Home page
  • I click About: the url changes to http://127.0.0.1:3009/about but I'm still seing the Home page
  • If I click again the About link, or if I reload, then the view changes to the About page
  • All futures navigations with the Home and About links work as expected

I don't see any logs on the browser console nor the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions