Skip to content

Commit

Permalink
Use smallvec/union and update ahash.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Jan 16, 2021
1 parent c4b6c31 commit def1e7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ keywords = [ "scripting" ]
categories = [ "no-std", "embedded", "wasm", "parser-implementations" ]

[dependencies]
smallvec = { version = "1.4", default-features = false }
ahash = { version = "0.3.2", default-features = false, features = ["compile-time-rng"] }
smallvec = { version = "1.6", default-features = false, features = ["union"] }
ahash = { version = "0.5", default-features = false }
rhai_codegen = { version = "0.3", path = "codegen" }

[features]
Expand All @@ -46,7 +46,7 @@ unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for ident
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" ]
no_std = [ "smallvec/union", "num-traits/libm", "hashbrown", "core-error", "libm", "ahash/compile-time-rng" ]

[profile.release]
lto = "fat"
Expand All @@ -55,46 +55,46 @@ codegen-units = 1
#panic = 'abort' # remove stack backtrace for no-std

[dependencies.libm]
version = "0.2.1"
version = "0.2"
default_features = false
optional = true

[dependencies.num-traits]
version = "0.2.11"
version = "0.2"
default-features = false
optional = true

[dependencies.core-error]
version = "0.0.0"
version = "0.0"
default_features = false
features = ["alloc"]
optional = true

[dependencies.hashbrown]
version = "0.7.1"
version = "0.7"
default-features = false
features = ["ahash", "nightly", "inline-more"]
optional = true

[dependencies.serde]
version = "1.0.116"
version = "1.0"
default_features = false
features = ["derive", "alloc"]
optional = true

[dependencies.serde_json]
version = "1.0.60"
version = "1.0"
default_features = false
features = ["alloc"]
optional = true

[dependencies.unicode-xid]
version = "0.2.1"
version = "0.2"
default_features = false
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant= { version = "0.1.7", features = ["wasm-bindgen"] } # WASM implementation of std::time::Instant
instant= { version = "0.1", features = ["wasm-bindgen"] } # WASM implementation of std::time::Instant

[package.metadata.docs.rs]
features = [ "serde", "internals" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Standard features
* Freely pass Rust variables/constants into a script via an external [`Scope`](https://rhaiscript.github.io/book/rust/scope.html) - all clonable Rust types are supported; no need to implement any special trait.
* Easily [call a script-defined function](https://rhaiscript.github.io/book/engine/call-fn.html) from Rust.
* Relatively little `unsafe` code (yes there are some for performance reasons).
* Few dependencies (currently only [`smallvec`](https://crates.io/crates/smallvec) and [`fxhash`](https://crates.io/crates/fxhash)).
* Few dependencies (currently only [`smallvec`](https://crates.io/crates/smallvec) and [`ahash`](https://crates.io/crates/ahash)).
* Re-entrant scripting engine can be made `Send + Sync` (via the `sync` feature).
* Scripts are [optimized](https://rhaiscript.github.io/book/engine/optimize.html) (useful for template-based machine-generated scripts) for repeated evaluations.
* Easy custom API development via [plugins](https://rhaiscript.github.io/book/plugins/index.html) system powered by procedural macros.
Expand Down

0 comments on commit def1e7f

Please sign in to comment.