-
Notifications
You must be signed in to change notification settings - Fork 912
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
WIP - wasm_bindgen backend for eventloop-2.0 #845
Conversation
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.
Nit: A lot of your files are missing a new line at the end.
Question: Do you intend to update the emscripten backend in an other PR, or are you not interested? |
@@ -18,9 +18,12 @@ mod platform; | |||
#[cfg(target_os = "emscripten")] |
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.
Question: Will emscripten conflict with websys with some targets?
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.
i don't believe so, the target triple used for websys is wasm32-unknown-unknown
. i would assume that if someone is building for wasm32-unknown-emscripten
they wouldn't also have the websys
feature set. i could add something like target_os = "unknown"
to the cfg condition below (line21) to be safe
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.
Just a question.
Is this PR missing some files or expected to not compile yet? Getting this error when trying to build, the CI systems are also failing with the same error:
|
This backend needs to be built for the I'll be pushing some changes tomorrow sometime, i can update the circleci config to include it. |
So, I had no idea this PR existed, and I started hacking on the |
I agree! In part I feel like that reflects the state of webassembly right now 😝 I'd be interested to hear @ryanisaacg's opinion given he's so far into the stdweb work, as well as from the project owners. Maybe open an issue? |
I think the stdweb version will be pretty much feature-complete within the month. At this point it can already run a full application, given you're not using one of the things I haven't implemented yet. I think it probably makes the most sense to finish the stdweb version and then add web-sys alongside, possibly inline with cfg declarations to switch between them. This means that changes can be easily applied to both web backends at once. However, I don't know much about idioms in web-sys, and it may be difficult to exactly mirror the structure of the stdweb code. |
Hey, we got a new |
wasm_bindgen
supportThis PR adds a wasm backend using
wasm_bindgen
andweb-sys
. This backend will be used whentarget_arch=wasm32
and thewebsys
feature is enabled.Implemenation status and todo
ControllFlow::Poll
ControlFlow::Wait
ControlFlow::WaitUntil
ControlFlow::Exit
wasm-pack-template
andwasm-app
project templatesCHANGELOG.md
if knowledge of this change could be valuable to usersCloses #395