Rhai v0.20.1 Release Notes

  • This version enables functions to access constants declared at global level via the special global module.

    🐛 Bug fixes

    • 🛠 Fixed bug when position is zero in insert and split_at methods for arrays.
    • Indexing operations with pure index values are no longer considered pure due to the possibility of indexers.

    💥 Breaking changes

    • Dynamic::is_shared and Dynamic::is_locked are removed under the no_closure feature. They used to always return false.
    • Engine::call_fn now evaluates the AST before calling the function.
    • Engine::on_progress is disabled with unchecked.

    ✨ Enhancements

    • The crate no-std-compat is used to compile for no-std. This removes the need to use a special crate::stdlib namespace for std imports.

    🆕 New features

    • A module called global is automatically created to hold global-level constants, which can then be accessed from functions.
    • 🐎 A new feature no_position is added to turn off position tracking during parsing to squeeze out the last drop of performance.