diff --git a/Cargo.toml b/Cargo.toml index 6ced850a..1f38d142 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,4 +65,4 @@ features = ["compile-time-rng"] optional = true [target.'cfg(target_arch = "wasm32")'.dependencies] -instant= "0.1.4" # WASM implementation of std::time::Instant +instant= { version = "0.1.4", features = ["wasm-bindgen"] } # WASM implementation of std::time::Instant diff --git a/README.md b/README.md index cc1411a9..d79c1218 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ to add scripting to any application. Supported targets ----------------- -* All common targets, including [WASM] and `no-std`. +* All common CPU targets for Windows, Linux and MacOS. +* [WASM] +* `no-std` Features -------- @@ -185,9 +187,11 @@ When building for WASM, certain features will not be available, such as the scri from external script files. Also look into [minimal builds] to reduce generated WASM size. As of this version, a typical, full-featured -Rhai scripting engine compiles to a single WASM file around 200KB gzipped. When excluding features that are +Rhai scripting engine compiles to a single WASM file less than 200KB gzipped. When excluding features that are marginal in WASM environment, the gzipped payload can be further shrunk to 160KB. +In benchmark tests, a WASM build runs scripts roughly 1.7-2.2x slower than a native optimized release build. + Related Resources -----------------