Skip to content

Commit ce23b4c

Browse files
authored
Merge pull request #442 from rparrett/webgpu
Allow examples to be built for WebGPU and add instructions
2 parents e7f5eea + 5961589 commit ce23b4c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ features = [
4646
"bevy_winit",
4747
"bevy_text",
4848
"bevy_sprite",
49-
"file_watcher",
50-
"webgl2",
49+
#"file_watcher",
5150
"multi-threaded"
5251
]
5352

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,21 @@ This can be made simple with [wasm-server-runner](https://github.com/jakobheller
8181

8282
After that's installed and configured, run:
8383

84+
#### WebGL2
85+
8486
```bash
85-
cargo run --target wasm32-unknown-unknown --example animation --release --features atlas
87+
cargo run --target wasm32-unknown-unknown --example animation --release --features atlas,bevy/webgl2
8688
```
8789

88-
**Note**: You **must** use the `atlas` feature when targeting the web. See [#283](https://github.com/StarArawn/bevy_ecs_tilemap/issues/283).
90+
**Note**: You **must** use the `atlas` feature when targeting the web with WebGL2. See [#283](https://github.com/StarArawn/bevy_ecs_tilemap/issues/283).
91+
92+
#### WebGPU
93+
94+
WebGPU is not yet well [supported](https://caniuse.com/webgpu) by many browsers.
95+
96+
```
97+
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo run --example animation --target=wasm32-unknown-unknown
98+
```
8999

90100
## Bevy Compatibility
91101

0 commit comments

Comments
 (0)