-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Implement single threaded task scheduler for WebAssembly #496
Conversation
Yeah it needs nightly for |
Oh, it actually did find an improvement to this use line. Fixed. |
The current clippy failure is probably because extern crate Maybe we should create a WasmLogPlugin to make configuring this easier / hiding it behind a feature flag easier? |
It is not a part of the engine per-se. Just an example on how one could handle panics in own application. Anyway, moving it to normal dev-dependencies (not target specific ones) helps. |
Alrighty lets merge this 😄 |
This implements a single threaded "TaskPool" and systems scheduler for use with WebAssembly target.
I see it as a temporary solution, until Rust wasm story gets better support for wasm threads (see #88). This is why I kept my change minimal, without any major refactoring. It is ugly, but it works.
Provided examples demonstrate how to build and run
wasm32
target. See examples/README.md.Bevy is now able to run "headless" in browser.
Together with #209 it should be enough (+/- fixes) to run Bevy app in browser.