Skip to content

Conversation

@emilk
Copy link
Owner

@emilk emilk commented Oct 10, 2025

Unfortunately, just switching glow to wgpu causes build errors for web, and runtime errors on native.
Apparently we also need to turn on some wgpu features, but that… sucks. And it is not obvious from the eframe docs.
This needs fixing.

Native

> cargo run
thread 'main' panicked at /Users/emilk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-27.0.1/src/api/instance.rs:65:13:
No wgpu backend feature that is implemented for the target platform was enabled. See `wgpu::Instance::enabled_backend_features()` for more information.

Web

error[E0433]: failed to resolve: could not find `web_sys` in `wgpu`
   --> /Users/emilk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/egui-wgpu-0.33.0/src/setup.rs:58:31
    |
58  |                         wgpu::web_sys::window().is_some_and(|w| w.is_secure_context());
    |                               ^^^^^^^ could not find `web_sys` in `wgpu`
    |
note: found an item that was configured out
   --> /Users/emilk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-27.0.1/src/lib.rs:143:9
    |
143 | pub use web_sys;
    |         ^^^^^^^
note: the item is gated here
   --> /Users/emilk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-27.0.1/src/lib.rs:142:1
    |
142 | #[cfg(web)]
    | ^^^^^^^^^^^

@kasper64
Copy link

Maybe it's stupid question, but is there a workaround for this?
I looked for the possibility to enable feature of dependencies's dependences, but that doesn't seem possible.

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.

3 participants