Add Decimal number type.

This commit is contained in:
Stephen Chung
2021-02-13 20:57:56 +08:00
parent 4fdd58f220
commit 3650b04c38
15 changed files with 477 additions and 16 deletions

View File

@@ -37,6 +37,7 @@ no_float = [] # no floating-point
f32_float = [] # set FLOAT=f32
only_i32 = [] # set INT=i32 (useful for 32-bit systems)
only_i64 = [] # set INT=i64 (default) and disable support for all other integer types
decimal = [ "rust_decimal" ] # add the Decimal number type
no_index = [] # no arrays and indexing
no_object = [] # no custom objects
no_function = [ "no_closure" ] # no script-defined functions (meaning no closures)
@@ -44,7 +45,7 @@ no_closure = [] # no automatic sharing and capture of anonymous functions to
no_module = [] # no modules
internals = [] # expose internal data structures
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
metadata = [ "serde", "serde_json"] # enables exporting functions metadata to JSON
metadata = [ "serde", "serde_json" ] # enables exporting functions metadata to JSON
# compiling for no-std
no_std = [ "smallvec/union", "num-traits/libm", "hashbrown", "core-error", "libm", "ahash/compile-time-rng" ]
@@ -98,6 +99,11 @@ version = "0.2"
default_features = false
optional = true
[dependencies.rust_decimal]
version = "1.10"
default_features = false
optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
instant= { version = "0.1" } # WASM implementation of std::time::Instant