All Versions
71
Latest Version
Avg Release Cycle
84 days
Latest Release
82 days ago

Changelog History
Page 1

  • v1.25.0 Changes

    May 24, 2026

    ๐Ÿ› Bug fixes

    • Engine::compact_script now properly compacts scripts with custom syntax that uses $raw$ (thanks @yuvalrakavy #1079).
    • The string methods split, split_rev and their variants are now marked pure so they can be called on const strings (thanks @theJC #1082).
    • The array method index_of now falls back to value comparison for string argument when no script function of that name is registered (thanks @yinho999 #1086).
    • The walk API now correctly visits the arguments to MethodCall and switch statements (thanks @isSerge #1092 #1093)

    ๐Ÿ†• New features

    • A new advanced callback, Engine::on_missing_function, is added (gated under the internals feature) to override default handling when a called function or method is not found (thanks @yuvalrakavy #1067).
    • โช A new method, EvalContext::new_frame, is added to created an isolated frame guard that automatically restores field values upon Drop (thanks @yuvalrakavy for the idea #1085).
    • ๐Ÿ‘ \${...} is supported in multi-line literal strings to escape interpolation, yielding literally ${...} for the string (thanks @yinho999 #1089).

    โœจ Enhancements

    • Procedural macros such as #[export_module] and #[derive(CustomType)] no longer require importing standard Rhai types (thanks @timokoesters #1071).
    • FnPtr::call_fn_as_method and FnPtr::call_as_method_within_context are added (when not under no_object) to accept a this pointer for calling the function pointer as a method call (thanks @yunfengzh for the request #1080).
    • NativeCallContext::call_method and NativeCallContext::call_native_method are added (when not under no_object) to accept a this pointer for method calls (thanks @yunfengzh for the idea #1080).
  • v1.24.0 Changes

    January 19, 2026

    ๐Ÿ’ฅ This new release has a breaking change because of the upgrade to the getrandom crate to version 0.3.

    ๐Ÿ‘ As a result, stdweb support has been dropped. It is anticipated that this change would not have significant impact on normal usage.

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿšš stdweb support is removed. The feature flag stdweb is also removed. Use wasm-bindgen instead.
    • ๐ŸŒ web-time is used for WASM targets instead of instant, which is no longer maintained #1063.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  (Fuzzing) Fixed panic when using sort on an array with a comparer function that does not implement a total order #1058.

    โœจ Enhancements

    • โšก๏ธ The optimizer now optimizes constant object map property accesses (thanks @phsym #1050).
    • Optimization is added to turn if cond1 { if cond2 { ... } } into if cond1 && cond2 { ... }.
    • The method sort for arrays is also aliased to sort_by.
    • The methods sort_desc, order, order_by and order_desc are added to arrays.
    • ๐Ÿ‘ป An exception is now thrown when attempting to use sort on an array containing unsupported element types.

    ๐Ÿ†• New features

    • AST::new_from_module is added to create an AST from a shared Module.
  • v1.23.3 Changes

    September 14, 2025

    ๐Ÿ”– Version Control

    ๐Ÿ— The ahash crate that Rhai depends on has a breaking change since version 0.8.12 which bumps getrandom to version 0.3, braking certain no-std and wasm builds.

    ๐Ÿ”– Version 1.23.3: Use this version when building for no-std

    ๐Ÿ”– Version 1.23.4: This is the main version for std builds.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  (Fuzzing) Fixed crash when using ..= in arrays, BLOB's, bit-fields and iterators (#1004).
    • Modules loaded within a ModuleResolversCollection now properly enable access to the scope etc.
    • Registered functions for comparison operators with only one operand being a custom type now works properly (thanks @mkeeter #1003).
    • NativeCallContext::fn_source now correctly returns the source of the function (usually None). The missing NativeCallContext::call_source is added to return the source of caller (thanks @FlashSystems #1013).
    • Engine::collect_fn_metadata now properly includes functions registered into the global namespace (thanks @therealprof and @matthiasbeyer #1017).

    โœจ Enhancements

    • ๐Ÿ— build.rs no longer writes to the source tree but OUT_DIR instead (thanks @matthiasbeyer #1018)
    • ๐Ÿ‘ CustomType derive macro now supports generic types (thanks @ProphetOSpam #999). The rhai_codegen crate dependency is bumped to 3.0.0 or later.
    • CustomType derive macro now handles Option fields (thanks @agersant #1011).
    • Engine::eval_fn_call is added to make a generic function call.
    • Engine::eval_binary_op is added to quickly compare two Dynamic values.
    • ๐Ÿ‘ Better handling for 32-bit architectures and enhanced safety by replacing casts with try_from (thanks @therealprof #1009).
    • The new symbol types $token$, $inner$, and $raw$ can now be used in custom syntax definitions (#1023).
    • Engine::register_custom_syntax_without_look_ahead_raw is added to allow the use of $raw$ in custom syntax, which returns the script text character-by-character without processing, by-passing the tokenizer. This in turn allows for parsing arbitrary syntax. (#1022)
    • CallFnOptions::in_all_namespaces is added to allow calling functions in all namespaces, instead of only scripted Rhai functions in the AST.
  • v1.22.0 Changes

    May 30, 2025

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  (Fuzzing) An integer-overflow bug from an inclusive range in get_bits is fixed (#963).
    • (Fuzzing) Nested functions marked private now properly cause compilation errors (#993).
    • Passing function as a function pointer into a function in an imported module now correctly encapsulates the current environment into the generated function pointer (thanks @dcihlar #976). The same for passing a closure (thanks again, @dcihlar #979).
    • Revised epsilon-based floating-point comparisons (thanks @HactarCE #981).
    • Unneeded optional dependencies are no longer pulled in with features (thanks @HactarCE #987).
    • Engine::collect_fn_metadata now properly includes the namespaces of functions in static modules (thanks @therealprof and @elkowar #992).

    โœจ Enhancements

    • ๐Ÿ‘Œ Improve display of function call errors by displaying the caller function's source together with line number info (thanks @rhizoome and @HactarCE #988).
    • source and position in NativeCallContext are now fn_source and call_position. A new method call_source is added to return the source (if any) of the caller function (thanks @rhizoome and @HactarCE #989).
    • โšก๏ธ The &&, || and ?? operators are optimized to allow efficient chaining (#994).
  • v1.21.0 Changes

    January 25, 2025

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed bug in raw strings (thanks @benatkin 944).
    • get_fn_metadata_list function is marked volatile.
    • ๐Ÿ— no-std plus sync should now build correctly (thanks stargazing-dino 947).

    ๐Ÿ†• New Features

    • It is possible to create a function pointer (FnPtr) which binds to a native Rust function or closure via FnPtr::from_dn and FnPtr::from_dyn_fn. When called in script, the embedded function will be called (thanks @makspll 952).

    โœจ Enhancements

    • The methods call_fn, call_native_fn, call_fn_raw and call_native_fn_raw are added to EvalContext (thanks @rawhuul 954).
    • A new internals function, Engine::collect_fn_metadata, is added to collect all functions metadata. This is to facilitate better error reporting for missing functions (thanks therealprof 945).
  • v1.20.1 Changes

    December 13, 2024

    ๐Ÿ”– Version 1.20.1

    ๐Ÿš€ This is a bug fix release.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed bug in raw strings with newlines (thanks @benatkin 940).

    โœจ Enhancements

    • ๐Ÿ‘ฏ If a string slice refers to the entire string, the slice is not cloned but returned as-is.
  • v1.20.0 Changes

    November 02, 2024

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  (Fuzzing) An integer-overflow bug from an inclusive range in the bits iterator is fixed.
    • ๐Ÿ›  (Fuzzing) An integer-underflow bug from an inclusive range is fixed.
    • Copy strings if the strings interner is busy instead of panicing (thanks @irevoire 917).
    • Deserialization of Scope now works correctly (thanks @AngelicosPhosphoros 918).
    • ๐Ÿ‘Œ Support for thumbv6m target is fixed (thanks chxry 919)

    ๐Ÿ†• New features

    • Added support for raw strings with the syntax ##..#" ... "#..## (thanks @cellomath 908 910).

    โœจ Enhancements

    • New as_immutable_string_ref, as_array_ref, as_blob_ref, as_map_ref plus their _mut variants for Dynamic (thanks @madonuko 904).
    • The break, return and throw statements can now be simply used as switch case statement expressions. Previously it is required that the statement be wrapped in a block.
  • v1.19.0 Changes

    June 30, 2024

    ๐Ÿ› Bug fixes

    • Variable resolver now correctly resolves variables that are captured in a closure.
    • ๐Ÿ“œ NativeCallContext<'_> (with a lifetime parameter) now parses correctly in the #[export_module] macro. This is to allow for rust_2018_idioms lints (thanks @ltabis 864).
    • ๐Ÿ— The sync feature now works properly in no-std builds (thanks @misssonder 874).
    • More data-race conditions are caught and returned as errors instead of panicking.
    • Missing min and max functions where both operands are floats or Decimal are added.
    • ๐Ÿ›  Fixed stack overflow when calling closures recursively (thanks @MageWeiG 880).
    • Engine::call_fn and Engine::call_fn_with_options now correctly use the AST's source field.
    • ๐Ÿ›  (Fuzzing) Fixed crash when using ..= in strings.
    • ๐Ÿ›  (Fuzzing) A recursive stack-overflow bug in Dynamic::is_hashable is fixed.

    ๐Ÿ†• New features

    • The break, continue, return and throw statements can now follow the ?? operator to short-circuit operations where the value is ().
    • ๐Ÿ“œ A new symbol, $func$, is added to custom syntax to allow parsing of anonymous functions.
    • The filter, drain and retain methods are added to object maps.
  • v1.18.0 Changes

    April 12, 2024

    ๐Ÿ›  Starting from this version, we try to put contributors' names on features/enhancements/fixes that they contributed.

    ๐Ÿ‘ We apologize for neglecting to adopt this practice earlier, but late is better than never!

    ๐Ÿ› Bug fixes

    • The position of an undefined operation call now points to the operator instead of the first operand.
    • โšก๏ธ The optimize command in rhai-repl now works properly and cycles through None->Simple->Full.
    • Engine::call_fn_XXX no longer return errors unnecessarily wrapped in EvalAltResult::ErrorInFunctionCall.
    • โœ… Some tests that panic on 32-bit architecture are fixed (thanks @alexanderkjall #851).
    • โšก๏ธ The optimizer no longer goes into an infinite loop when optimizing a try statement with an empty body.

    ๐Ÿ—„ Deprecated API's

    • The plugin macros export_fn, register_exported_fn!, set_exported_fn! and set_exported_global_fn! are deprecated because they do not add value over existing direct API's.

    ๐Ÿ†• New features

    • Sub-strings can now be selected from full strings by indexing via ranges, e.g. s[1..4] (thanks @zitsen #845).
    • Doc-comments are now automatically added to function registrations and custom types via the CustomType derive macro (thanks @Itabis #847).
    • New options Engine::set_max_strings_interned and Engine::max_strings_interned are added to limit the maximum number of strings interned in the Engine's string interner.
    • A new advanced callback, Engine::on_invalid_array_index, is added (gated under the internals feature) to handle access to missing properties in object maps.
    • A new advanced callback, Engine::on_missing_map_property, is added (gated under the internals feature) to handle out-of-bound index into arrays.

    โœจ Enhancements

    • ๐Ÿ“‡ parse_json is also available without the metadata or serde feature -- it uses Engine::parse_json to parse the JSON text (thanks @Mathieu-Lala #840).
    • FuncRegistration::in_global_namespace and FuncRegistration::in_internal_namespace are added to avoid pulling in FnNamespace.
    • ๐Ÿ“ฆ Array/BLOB/string iterators are defined also within the BasicIteratorPackage in addition to the regular array/BLOB/string packages.
    • ๐Ÿ“œ LexError::Runtime is added for use with Engine::on_parse_token.
    • ๐Ÿ”€ Shared values under sync are now handled more elegantly -- instead of deadlocking and hanging indefinitely, it spins for a number of tries (waiting one second between each), then errors out.
  • v1.17.1 Changes

    February 02, 2024

    ๐Ÿš€ This is a bug-fix release that bumps rhai_codegen version to 2.0.0 to satisfy semver rules.