Skip to content

Conversation

@guybedford
Copy link
Collaborator

@guybedford guybedford commented Oct 30, 2025

Mulling this one over as an alternative to #784.

This uses a new wasm bindgen feature for unsafe-single-threaded-traits which just makes everything Sync and Send for us under the single-threaded assumption.

Would simplify things not having to have this noise in Rust Workers codebase.

@guybedford
Copy link
Collaborator Author

Ahh, found the failures here - I see this is because of Axum.

@WERDXZ
Copy link

WERDXZ commented Oct 30, 2025

Cases like leptos ssr do want server functions to return a future that is Send, this (the send module) become useful when downstream users needs to make futures Send in workers environment, especially like the JsFuture type.

It might not be a great example of usage, but I am using it in my website.

@guybedford
Copy link
Collaborator Author

I've updated this PR to use an experimental wasm bindgen feature for this in wasm-bindgen/wasm-bindgen#4770, and this approach seems to work now.

@guybedford
Copy link
Collaborator Author

All tests are passing - CI failure here is due to the examples build not using the forked wasm bindgen worker-build.

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.

2 participants