Use no-std-compat to build no-std.

This commit is contained in:
Stephen Chung
2021-04-17 15:15:54 +08:00
parent 2f2b7403cb
commit 01f0cc028b
48 changed files with 293 additions and 293 deletions

View File

@@ -41,7 +41,7 @@ internals = [] # expose internal data structures
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
metadata = ["serde_json", "rhai_codegen/metadata"] # enable exporting functions metadata
no_std = ["num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"]
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"]
# compiling for WASM
wasm-bindgen = ["instant/wasm-bindgen"]
@@ -53,6 +53,12 @@ codegen-units = 1
#opt-level = "z" # optimize for size
#panic = 'abort' # remove stack backtrace for no-std
[dependencies.no-std-compat]
version = "0.4"
default_features = false
features = ["alloc"]
optional = true
[dependencies.libm]
version = "0.2"
default_features = false