Skip to content
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

Mention --cfg=web_sys_unstable_apis in WebGPU build instructions #9382

Closed
nicopap opened this issue Aug 7, 2023 · 1 comment · Fixed by #10163
Closed

Mention --cfg=web_sys_unstable_apis in WebGPU build instructions #9382

nicopap opened this issue Aug 7, 2023 · 1 comment · Fixed by #10163
Labels
C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy O-WebGPU Specific to the WebGPU render API

Comments

@nicopap
Copy link
Contributor

nicopap commented Aug 7, 2023

How can Bevy's documentation be improved?

To be able to use WebGPU on web, you need to set the RUSTFLAGS environment variable to --cfg=web_sys_unstable_apis. Nowhere is it mentioned in the bevy docs, and it's not trivial to find out from searching the bevy repo.

Reading the docs at:

No mention is made of that environment variable. Also, it's implied that everything should work, there is no obvious disclaimer that it's "experimental" or "unsupported" and instructions are provided specifically wrt to WebGPU.

Apparently I'm not the only one who encountered this: #9177

@nicopap nicopap added C-Docs An addition or correction to our documentation O-WebGPU Specific to the WebGPU render API labels Aug 7, 2023
@nicopap nicopap added the D-Trivial Nice and easy! A great choice to get started with Bevy label Sep 2, 2023
@mnmaita
Copy link
Member

mnmaita commented Oct 17, 2023

I had this exact same issue when trying to ship a WASM build to itch.io. I just pushed #10163 to try to add some more details on this matter. Please let me know if the added documentation is enough and is understandable. Thanks for filing it!

github-merge-queue bot pushed a commit that referenced this issue Oct 18, 2023
# Objective

- Fixes #9382

## Solution

- Added a few extra notes in regards to WebGPU experimental state and
the need of enabling unstable APIs through certain attribute flags in
`cargo_features.md` and the examples `README.md` files.
ameknite pushed a commit to ameknite/bevy that referenced this issue Nov 6, 2023
# Objective

- Fixes bevyengine#9382

## Solution

- Added a few extra notes in regards to WebGPU experimental state and
the need of enabling unstable APIs through certain attribute flags in
`cargo_features.md` and the examples `README.md` files.
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this issue Jan 9, 2024
# Objective

- Fixes bevyengine#9382

## Solution

- Added a few extra notes in regards to WebGPU experimental state and
the need of enabling unstable APIs through certain attribute flags in
`cargo_features.md` and the examples `README.md` files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy O-WebGPU Specific to the WebGPU render API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants