-
-
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
Cannot compile bevy_wgpu for WASM #3162
Comments
Bevy 0.5 doesn't natively support compiling for wasm. You need bevy-webgl for that. The pipelined-renderer branch does support it with the newel renderer that uses the latest wgpu version. |
Near-duplicate of #88. :) |
@bjorn3 I tried using bevy_webgl2 as well and it did not solve the compilation issue |
Maybe you need to disable the bevy_wgpu feature of bevy? |
Sorry, I see what you mean - bevy_webgl2 is intended to be a web friendly alternative for bevy_wgpu. So my issue would be better restated as "I cannot figure out how to use bevy and bevy_webgl2 together on WASM". I can close and reopen a different issue |
@TheButlah see https://bevy-cheatbook.github.io/platforms/wasm.html for an excellent guide. |
Bevy version
0.5
Operating system & version
Ubuntu 20.04 on WSL2
What you did
Add bevy_wgpu to Cargo.toml, and compile with
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo check --target wasm32-unknown-unknown
What you expected to happen
It compiles
What actually happened
Additional information
Any additional information you would like to add such as screenshots, logs, etc.
The text was updated successfully, but these errors were encountered: