Add wasm-bindgen to instant crate for wasm.
This commit is contained in:
parent
2a73841549
commit
2f815e277d
@ -65,4 +65,4 @@ features = ["compile-time-rng"]
|
|||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[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
|
||||||
|
@ -14,7 +14,9 @@ to add scripting to any application.
|
|||||||
Supported targets
|
Supported targets
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
* All common targets, including [WASM] and `no-std`.
|
* All common CPU targets for Windows, Linux and MacOS.
|
||||||
|
* [WASM]
|
||||||
|
* `no-std`
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
@ -185,9 +187,11 @@ When building for WASM, certain features will not be available, such as the scri
|
|||||||
from external script files.
|
from external script files.
|
||||||
|
|
||||||
Also look into [minimal builds] to reduce generated WASM size. As of this version, a typical, full-featured
|
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.
|
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
|
Related Resources
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user