Chrome or Edge (Webkit) Out of Memory (oom) crash within seconds of WASM bevy builds
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
Tested with `Main` branch with commit `ab83336f` along with `release-0.6.1` @ `6acf932c`
## Operating system & version
Windows 10 21H2
Chrome 98.0.4758.102 (Official Build) (64-bit)
## What you did
Essentially followed the `WASM` section of the `examples` readme.
I used these commands to build the `text_debug` example, without the `--no-default-features` flag, or else it wouldn't build. Modified `index.html` to point to `wasm_example.js` after building. Launched with `basic-http-server examples/wasm`
```haskell
cargo build --example text_debug --target wasm32-unknown-unknown
wasm-bindgen --out-name wasm_example --out-dir examples/wasm/target --target web target/wasm32-unknown-unknown/debug/examples/text_debug.wasm
```
## What you expected to happen
Expected The text_debug example to launch and render in the browser.
## What actually happened
It would launch and render for a few seconds, while being very stuttery then the tab would crash from and out of memory error.
## Additional information
It would happen with any of the example projects.
Came across this reddit post describing this workaround which I tested working:
set in `Cargo.toml`
```haskell
[profile.dev]
opt-level = 2
```
Creating this issue since I didn't see one yet as requested in
https://www.reddit.com/r/rust/comments/s06vx3/how_to_get_a_developerfriendly_workflow_with_bevy/hs0228d/
Contributor guide
Assessment
This issue has not been assessed yet.