From 4dfa1c0a4233f35bc0e56ccaedc2c1624fe34b26 Mon Sep 17 00:00:00 2001 From: Shea Leffler Date: Sat, 21 Aug 2021 23:38:50 -0700 Subject: [PATCH] Don't link to sapp-jsutils when we don't need to (#1) * Don't link to sapp-jsutils when we don't need to * Update src/lib.rs * Update Cargo.toml Co-authored-by: ilya sheprut --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 08c2bb4..267a0e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ Plugin for macro-, mini-quad (quads) to do anything with url. """ readme="README.md" -[dependencies] +[target.'cfg(target_arch = "wasm32")'.dependencies] sapp-jsutils = "0.1.4" [target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "macos", target_os = "android"))'.dependencies] diff --git a/src/lib.rs b/src/lib.rs index 6835180..f876632 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,7 @@ //! ``` //! Done! Now you can use this crate. -#[allow(unused_imports)] +#[cfg(target_arch = "wasm32")] use sapp_jsutils::{JsObject, JsObjectWeak}; #[no_mangle]