Features of Rhai

Easy

Fast

  • Fairly efficient evaluation – 1 million iterations in 0.14 sec on a single-core, 2.6 GHz Linux VM (see benchmarks).

  • 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.

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

  • Passes Miri.

Rugged

Flexible