New
Versions 1.23.3 and 1.23.4
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
ModuleResolversCollectionnow properly enable access to thescopeetc. - Registered functions for comparison operators with only one operand being a custom type now works properly (thanks
@mkeeter#1003). NativeCallContext::fn_sourcenow correctly returns the source of the function (usuallyNone). The missingNativeCallContext::call_sourceis added to return the source of caller (thanks@FlashSystems#1013).Engine::collect_fn_metadatanow properly includes functions registered into the global namespace (thanks@therealprofand@matthiasbeyer#1017).
Enhancements
build.rsno longer writes to the source tree butOUT_DIRinstead (thanks@matthiasbeyer#1018)CustomTypederive macro now supports generic types (thanks@ProphetOSpam#999). Therhai_codegencrate dependency is bumped to3.0.0or later.CustomTypederive macro now handlesOptionfields (thanks@agersant#1011).Engine::eval_fn_callis added to make a generic function call.Engine::eval_binary_opis added to quickly compare twoDynamicvalues.- Better handling for 32-bit architectures and enhanced safety by replacing casts with
try_from(thanks ).