Download Latest Version Version 1.26.0 source code.zip (1.0 MB)
Email in envelope

Get an email when there's a new version of Rhai

Home / v1.26.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-08-25 2.2 kB
Version 1.26.0 source code.tar.gz 2026-08-25 812.8 kB
Version 1.26.0 source code.zip 2026-08-25 1.0 MB
Totals: 3 Items   1.8 MB 0

This is a significant release.

The major change in this version is the addition of the experimental Rhai Grain bytecodes VM for faster evaluation of scripts under resource constraints.

This is experimental and gated under the grain feature flag.

Rhai Grain VM

  • Add the experimental Rhai Grain bytecodes compiler and VM (requires the grain feature) for fast evaluation of scripts (thanks @ImTheSquid #1109).

Bugs found in the process

Since the Rhai Grain VM must run a script exactly the same as the standard AST interpreter, a number of bugs have been uncovered that are now fixed.

  • Fixes a very serious bug in optimizer that erroneously removes statements involving variable access which should be considered side effects (#1126).
  • Fixes a serious bug with function pointers being called in method-call style with curried arguments; the arguments were passed to a native Rust function in the wrong order. (#1139).
  • Fixes bug in switch statement that fails to try ranges when all conditions of exact matches fail (#1117).
  • Fixes bug in switch statement that fails to match shared values (#1123).
  • Fixes bug in optimizer that fails to optimize closures (#1114).

Bug fixes

  • Fixes bug in Engine::compact_script that generates invalid compacted scripts due to missing spaces between ambiguous operators (thanks @yuvalrakavy #1106).

Enhancements

  • BloomFilterU64 is modified to take the sizes of the bit array as a const generic parameter instead of hard-coded to be 256 slots (32 bytes).
  • The serde and metadata features can now be used in no-std builds (#1130).
  • Allow no-std builds for WASM (#1155).
Source: README.md, updated 2026-08-25