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

WebGPU build broken #3675

Closed
emilk opened this issue Dec 4, 2023 · 8 comments · Fixed by #3824
Closed

WebGPU build broken #3675

emilk opened this issue Dec 4, 2023 · 8 comments · Fixed by #3824
Labels
bug Something is broken egui-wgpu help wanted Extra attention is needed web Related to running Egui on the web

Comments

@emilk
Copy link
Owner

emilk commented Dec 4, 2023

./scripts/build_demo_web.sh --webgpu --release
./scripts/start_server.sh

panicked at 'canvas context is not a GPUCanvasContext: Object { obj: JsValue(GPUCanvasContext) }', /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/web.rs:975:14

@emilk emilk added bug Something is broken web Related to running Egui on the web egui-wgpu labels Dec 4, 2023
@emilk emilk added this to the 0.25.0 milestone Dec 4, 2023
@Wumpf
Copy link
Collaborator

Wumpf commented Dec 12, 2023

struggling with this one. It seems to fail a cast that should just work. Suspected some kind of web_sys/wasm-bindgen version issue but updating those didn't help so far. Hoping for responses on wgpu matrix chat right now

@Wumpf
Copy link
Collaborator

Wumpf commented Dec 12, 2023

Meanwhile, re_renderer's examples work fine on webgpu using the exact same wgpu, bindgen, web_sys, js_sys versions 😕

@emilk emilk mentioned this issue Dec 28, 2023
@Wumpf Wumpf removed their assignment Dec 28, 2023
@Wumpf Wumpf added the help wanted Extra attention is needed label Dec 28, 2023
@emilk
Copy link
Owner Author

emilk commented Jan 12, 2024

According to @Wumpf the wgpu web build works again with this wgpu pr), so this will likely solve itself when we update wgpu

@rakurtz
Copy link

rakurtz commented Jan 15, 2024

Hey emilk, i am not sure if the error message i get when i try to compile the eframe template with wgpu instead of glow is related to the above described issue:

error: failed to select a version for `web-sys`.
    ... required by package `wgpu v0.18.0`
    ... which satisfies dependency `wgpu = "^0.18.0"` of package `eframe v0.25.0`
    ... which satisfies dependency `eframe = "^0.25.0"` (locked to 0.25.0) of package `msg-extractor v0.1.0 (/Users/xxxxxx/VisualStudioCodeProjects/Rust/HELPER/msg-extractor)`
versions that meet the requirements `^0.3.64` (locked to 0.3.67) are: 0.3.67

the package `wgpu` depends on `web-sys`, with features: `GpuComputePassTimestampWrite` but `web-sys` does not have these features.

Maybe that helps ?

@emilk
Copy link
Owner Author

emilk commented Jan 15, 2024

no, that's a compilation issue. Looks like you're using an old web-sys

@emilk
Copy link
Owner Author

emilk commented Jan 15, 2024

A fix is coming in #3824

@rakurtz
Copy link

rakurtz commented Jan 15, 2024

no, that's a compilation issue. Looks like you're using an old web-sys

mmh, i am using the current version of web-sys 0.3.67. I just took the eframe-template and switched to wgpu in Cargo.toml though. Shall i file another issue dedicated to the above error messages?

@emilk
Copy link
Owner Author

emilk commented Jan 16, 2024

@rakurtz you are using a newer web-sys with an older wgpu. If you switch to wgpu trunk, or downgrade web-sys, it will work.

see gfx-rs/wgpu#4777

emilk added a commit that referenced this issue Jan 19, 2024
* Closes #3675

---------

Co-authored-by: Andreas Reich <[email protected]>
Co-authored-by: Mingun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui-wgpu help wanted Extra attention is needed web Related to running Egui on the web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants