Features

Easy

Fast

  • Fairly efficient evaluation (1 million iterations in 0.3 sec on a single-core, 2.3 GHz Linux VM).

  • Compile once to AST for repeated evaluations.

  • Scripts are optimized (useful for template-based machine-generated scripts).

Dynamic

Safe

  • Relatively little unsafe code (yes there are some for performance reasons). unsafe is only ever used for type casting purposes, and is never used to get around the borrow checker. In other words, unsafe code in Rhai never introduces potential data races.

  • Sand-boxed – the scripting Engine, if declared immutable, cannot mutate the containing environment unless explicitly permitted.

Rugged

Flexible