Skip to content

Conversation

WorldSEnder
Copy link
Contributor

@WorldSEnder WorldSEnder commented Oct 7, 2025

PR is for testing for now. The git dependency must be replaced by a proper release of the wasm-split crate before merging.

To be used in tandem with the PR on cargo-leptos in leptos-rs/cargo-leptos#578

currently a git dependency, must be fixed before merge
@johansmitsnl
Copy link

johansmitsnl commented Oct 7, 2025

My feedback on the test.

During the wasm compilation I see warnings on the trait:

warning: function `__ConsolePageSectionPreviewRoute_View` should have a snake case name
   --> src/app.rs:586:20
    |
586 | impl LazyRoute for ConsolePageSectionPreviewRoute {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `__console_page_section_preview_route_view`

The error I get in my project is:

Uncaught RuntimeError: indirect call to null
[app.wasm:8200590:1](http://127.0.0.1:8000/pkg/app.wasm)
    _ZN12wasm_bindgen4__rt8wbg_cast17h7e34a28c9f8f75fcE http://127.0.0.1:8000/pkg/app.wasm:8200590
    _ZN12wasm_bindgen7closure16Closure$LT$T$GT$4wrap17hb4d7d15805f372faE http://127.0.0.1:8000/pkg/app.wasm:6450621
    _ZN10leptos_use18use_event_listener31use_event_listener_with_options17h33e8f651187e3ed9E http://127.0.0.1:8000/pkg/app.wasm:877533
    _ZN10leptos_use18use_event_listener31use_event_listener_with_options17h33e8f651187e3ed9E http://127.0.0.1:8000/pkg/DDXqf-gPnDII5b5U8xfm7Q.wasm:4710614

Edit, in Chrome I get a better error:

Uncaught RuntimeError: null function or function signature mismatch
    at _ZN12wasm_bindgen4__rt8wbg_cast17h7e34a28c9f8f75fcE (app.wasm:0x7d218e)
    at _ZN12wasm_bindgen7closure16Closure$LT$T$GT$4wrap17hb4d7d15805f372faE (app.wasm:0x626dbd)
    at _ZN10leptos_use18use_event_listener31use_event_listener_with_options17h33e8f651187e3ed9E (app.wasm:0xd63dd)
    at _ZN10leptos_use18use_event_listener31use_event_listener_with_options17h33e8f651187e3ed9E (DDXqf-gPnDII5b5U8xfm7Q.wasm:0x47e0d6)

I'll share a zip of the output in Discord.

@WorldSEnder
Copy link
Contributor Author

@johansmitsnl if you have time, I'd value your test on the newest updated version of both this branch paired with the cargo-leptos PR (sorry if you got the earlier ping).
@gbj can we somehow disable or turn down CI while this is in draft mode? While not my wasted money and energy, I feel somewhat responsible :p

@johansmitsnl
Copy link

@WorldSEnder I did a quick test and it is working with a debug build

Copy link
Collaborator

@gbj gbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me, with the crate-name caveat noted above.

tachys = { path = "./tachys", version = "0.2.9" }
wasm_split_helpers = { path = "./wasm_split", version = "0.1.2" }
wasm_split_macros = { path = "./wasm_split_macros", version = "0.1.3" }
wasm_split = { git = "https://github.com/WorldSEnder/wasm-split-prototype.git", version = "0.1", rev = "58a1687f830b87418e6e55fcdbb68c2fbee639f8" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: you're not going to be able to publish this as wasm_split due to a 6 year old name-squat. But I'm happy to give shared ownership of wasm_split_helpers if we're going to use the same crate anyway.

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.

3 participants