Dependencies

Rhai takes care to pull in as few dependencies as possible in order to avoid bloat when using the library.

Main Dependencies

CrateDescriptionWhy use it?
smallvecVec variant that stores a number of items inlinemost functions have very few parameters, and avoiding allocations result in significant performance improvement
num-traitsnumeric traitsfor use with macros defining arithmetic functions and operators
ahashfast hashing for datanot cryptographically secure, thus faster than standard Rust hashing; Rhai does a lot of hashing so this matters
once_cellglobal static datafixed hashing keys for static hashing
bitflagsbit fieldsstore 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

no-std Dependencies

CrateDescription
no-std-compatcreate std imports under no-std
libmno-std math library
core-errorError trait for no-std
hashbrownHashMap and HashSetfor no-std

Feature Dependencies

WASM Dependencies