Skip to content

Versions 1.23.3 and 1.23.4

Latest

Choose a tag to compare

@schungx schungx released this 14 Sep 12:51
· 40 commits to main since this release
13020d7

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.