Use target_family for wasm.
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -41,8 +41,8 @@
|
||||
//! engine.register_fn("compute", compute_something);
|
||||
//!
|
||||
//! # #[cfg(not(feature = "no_std"))]
|
||||
//! # #[cfg(not(target_arch = "wasm32"))]
|
||||
//! # #[cfg(not(target_arch = "wasm64"))]
|
||||
//! # #[cfg(not(target_family = "wasm"))]
|
||||
//! #
|
||||
//! // Evaluate the script, expecting a 'bool' result
|
||||
//! let result = engine.eval_file::<bool>("my_script.rhai".into())?;
|
||||
//!
|
||||
@@ -365,17 +365,15 @@ compile_error!("`wasm-bindgen` cannot be used with `no-std`");
|
||||
#[cfg(feature = "stdweb")]
|
||||
compile_error!("`stdweb` cannot be used with `no-std`");
|
||||
|
||||
#[cfg(any(target_arch = "wasm32", target_arch = "wasm64"))]
|
||||
#[cfg(target_family = "wasm")]
|
||||
#[cfg(feature = "no_std")]
|
||||
compile_error!("`no_std` cannot be used for WASM target");
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(not(target_arch = "wasm64"))]
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
#[cfg(feature = "wasm-bindgen")]
|
||||
compile_error!("`wasm-bindgen` cannot be used for non-WASM target");
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(not(target_arch = "wasm64"))]
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
#[cfg(feature = "stdweb")]
|
||||
compile_error!("`stdweb` cannot be used non-WASM target");
|
||||
|
||||
|
Reference in New Issue
Block a user