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?
smallvecVec variant that stores a number of items inlinemost functions have very few parameters, and avoiding allocations result in significant performance improvement
thin-vecVec variant that takes up only the size of a single pointermake key enum types with variants that contain Vec’s smaller
num-traitsnumeric traits for use with macros defining arithmetic functions and operators
ahashfast hashing for data not cryptographically secure, thus faster than standard Rust hashing; Rhai does a lot of hashing so this matters
once_cellglobal static data fixed hashing keys for static hashing
bitflagsbit fields store flags in AST nodes to minimize memory usage
smartstringString 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