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

Building wasm32-unknown-emscripten fails since it includes both wasm and linux platform #2970

Closed
Wumpf opened this issue Jul 22, 2023 · 2 comments · Fixed by #2971
Closed
Labels

Comments

@Wumpf
Copy link
Contributor

Wumpf commented Jul 22, 2023

Worked out of the box in 0.27.5, but in 0.28.0 it seems that the config checks in https://github.com/rust-windowing/winit/blob/master/src/platform_impl/mod.rs#L9 incorrectly detect wasm32-unknown-emscripten as a linux platform, causing compilation failure

See https://github.com/gfx-rs/wgpu/actions/runs/5618255769/job/15223561268?pr=3950#step:9:55

@daxpedda
Copy link
Member

I wasn't aware that wasm32-unknown-emscripten enables cfg(unix), that's funny.
In any case, we don't support Emscripten.

The reason why this used to work, is because wasm-bindgen stubs out implementations on any unsupported platforms, it's just that any calls would panic.

@kchibisov I would argue that Winit, because it doesn't support Emscripten, should just fail on compilation. As is already done with other unsupported platforms here:
https://github.com/rust-windowing/winit/blob/43acf7f42f4474d2c66815e9c1b392b4d3175594/src/platform_impl/mod.rs#L57-L68
WDYT?

@kchibisov
Copy link
Member

@kchibisov I would argue that Winit, because it doesn't support Emscripten, should just fail on compilation. As is already done with other unsupported platforms here:

Sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants