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

Fix web example build #5832

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Fix web example build #5832

merged 4 commits into from
Jun 20, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jun 17, 2024

Connections

Description
Bunch of fixes to examples running on the web:

  • avoid using WebGPU on WebGL examples (previously, a WebGPU enabled browser would just always run webgpu even when it looks like WebGL was selected)
    • there's a useful debug output now in the examples to confirm this
  • Fix ip that run-wasm prints - http://0.0.0.0:8000 won't allow WebGPU
  • Fix (already before) incorrect instructions on how to run the examples on the web

Testing
Ran the examples in Firefox & WebGPU on the web.
We should still display something nicer when WebGPU isn't supported...
@Reviewer: If you happen to experiment with this on your machine don't make my mistake and force refresh on every change -.-

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@Wumpf Wumpf requested a review from a team as a code owner June 17, 2024 21:43
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus a nit!

README.md Outdated Show resolved Hide resolved
@Wumpf Wumpf merged commit 7b89b6d into gfx-rs:trunk Jun 20, 2024
25 checks passed
@Wumpf Wumpf deleted the fix-web-example-build branch June 20, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All wgpu-examples fail with WebGPU on both Chrome dev and Firefox nightly
2 participants