From f91631174498498c134dbeb2baff0219dfeb7ceb Mon Sep 17 00:00:00 2001 From: Michael Tang Date: Thu, 31 Oct 2019 09:45:12 -0700 Subject: [PATCH] Add error message when building for web without selecting a feature. (#1253) --- src/platform_impl/web/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platform_impl/web/mod.rs b/src/platform_impl/web/mod.rs index 44d4fc19..029761b9 100644 --- a/src/platform_impl/web/mod.rs +++ b/src/platform_impl/web/mod.rs @@ -16,6 +16,9 @@ mod backend; #[path = "stdweb/mod.rs"] mod backend; +#[cfg(not(any(feature = "web-sys", feature = "stdweb")))] +compile_error!("Please select a feature to build for web: `web-sys`, `stdweb`"); + pub use self::device::Id as DeviceId; pub use self::error::OsError; pub use self::event_loop::{