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

Allow compiling winit to wasm32-unknown-unknown target #2

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add wasm32 target arch using same emscripten platform
iceiix committed Mar 2, 2019
commit dad2ea4d13e3a43fb1ff135c0fdc1c79919d4c8e
2 changes: 1 addition & 1 deletion src/platform/emscripten/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(target_os = "emscripten")]
#![cfg(any(target_os = "emscripten", target_arch = "wasm32"))]

mod ffi;

5 changes: 3 additions & 2 deletions src/platform/mod.rs
Original file line number Diff line number Diff line change
@@ -15,12 +15,13 @@ mod platform;
#[cfg(target_os = "ios")]
#[path="ios/mod.rs"]
mod platform;
#[cfg(target_os = "emscripten")]
#[cfg(any(target_os = "emscripten", target_arch = "wasm32"))]
#[path="emscripten/mod.rs"]
mod platform;

#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"),
not(target_os = "macos"), not(target_os = "android"), not(target_os = "dragonfly"),
not(target_os = "freebsd"), not(target_os = "netbsd"), not(target_os = "openbsd"),
not(target_os = "emscripten")))]
not(target_os = "emscripten"),
not(target_arch = "wasm32")))]
compile_error!("The platform you're compiling for is not supported by winit");