Rhai takes care to pull in as few dependencies as possible in order to avoid bloat when using the library.
Crate Description Why use it?
smallvec
Vec
variant that stores a number of items inlinemost functions have very few parameters, and avoiding allocations result in significant performance improvement
num-traits
numeric traits for use with macros defining arithmetic functions and operators
ahash
fast hashing for data not cryptographically secure, thus faster than standard Rust hashing; Rhai does a lot of hashing so this matters
once_cell
global static data fixed hashing keys for static hashing
bitflags
bit fields store flags in AST
nodes to minimize memory usage
smartstring
String
variant that stores short strings inlinemost strings in scripts (e.g. keywords, properties, symbols, variables, function names etc.) are short, and avoiding allocations result in significant performance improvement