Skip to content

Commit

Permalink
Update examples README template and rolls back incorrect statement
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmaita committed Oct 18, 2023
1 parent fd85007 commit a08937b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs-template/EXAMPLE_README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ Bevy support for WebGPU is being worked on, but is currently experimental.

To build for WebGPU, you'll need to disable default features and add all those you need, making sure to omit the `webgl2` feature.

Also, given the fact that WebGPU depends on unstable APIs you will also need to pass the `web_sys_unstable_apis` flag to your builds. For example:

```sh
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo run ...
```

Check `wasm-bindgen` [docs on Unstable APIs](https://rustwasm.github.io/wasm-bindgen/web-sys/unstable-apis.html) for more details.

Bevy has an helper to build its examples:

- Build for WebGL2: `cargo run -p build-wasm-example -- --api webgl2 load_gltf`
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ ruby -run -ehttpd examples/wasm

#### WebGL2 and WebGPU

Bevy ships with WebGPU by default, but it is being worked on and is currently experimental.
Bevy support for WebGPU is being worked on, but is currently experimental.

To build for WebGPU, you'll need to disable default features and add all those you need, making sure to omit the `webgl2` feature.

Expand Down

0 comments on commit a08937b

Please sign in to comment.