-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Get wasm bindgen working on desktop #5194
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
base: main
Are you sure you want to change the base?
Conversation
| let form_element = self | ||
| .element | ||
| .dyn_ref::<web_sys_x::HtmlFormElement>() | ||
| .cloned() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the existing behavior we tested for in dioxus desktop
CI is running out of storage with the new crates this PR adds. Running locally on linux gnu, the same tests pass |
This PR adds support for a fork of wasm bindgen, web sys and js sys. It moves the virtual dom to a separate thread from the event loop. This lets us share a lot more code between desktop and web including the logic for:
Breaking changes
web-sys-xtypes which usewasm-bindgen-xfor desktop compatibilitySendbound. This breaks a couple of examplesStatus of wasm-bindgen-x
Where we still aren't compatible with wasm-bindgen:
memory()wasm_bindgen::convertPublishing:
An initial version is published here which works for dioxus' use cases without a patch. For patching it may be easier to rely on the git tag instead as cargo doesn't let you patch to the same source without a registry alias.
The current published version of web-sys-x has only a limited number of features because of the crates.io limit of 300 features per crate. I have reached out to the crates.io team to see if we can remove that limit to publish the full version
TODO
Partially addresses #4142 since
as_web_eventnow works on desktop and mobile