From aef18b5473d5ae9fcfd0006d21d2fbf851716036 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 18 Jan 2021 11:35:55 +0800 Subject: [PATCH] Add wasm-bindgen and stdweb features. --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ef8767ae..e433e996 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,10 @@ metadata = [ "serde", "serde_json"] # enables exporting functions metadata to JS # compiling for no-std no_std = [ "smallvec/union", "num-traits/libm", "hashbrown", "core-error", "libm", "ahash/compile-time-rng" ] +# compiling for WASM +wasm-bindgen = [ "instant/wasm-bindgen" ] +stdweb = [ "instant/stdweb" ] + [profile.release] lto = "fat" codegen-units = 1 @@ -94,7 +98,7 @@ default_features = false optional = true [target.'cfg(target_arch = "wasm32")'.dependencies] -instant= { version = "0.1", features = ["wasm-bindgen"] } # WASM implementation of std::time::Instant +instant= { version = "0.1" } # WASM implementation of std::time::Instant [package.metadata.docs.rs] features = [ "metadata", "internals" ]