Repository navigation
v.0.17.0
Version 0.17.0 released to crates.io
This version adds:
serdesupport for working withDynamicvalues (particularly object maps).- Low-level API to register functions.
- Surgically disable keywords and/or operators in the language.
- Define custom operators.
- Extend the language via custom syntax.
Bug fixes
- Fixed method calls in the middle of a dot chain.
Breaking changes
EvalAltResult::ErrorMismatchOutputTypehas an extra argument containing the name of the requested type.Engine::call_fn_dynamictake an extra argument, allowing aDynamicvalue to be bound to thethispointer.- Precedence of the
%(modulo) operator is lowered to below<<ad>>. This is to handle the case ofx << 3 % 10.
New features
- New
serdefeature to allow serializating/deserializating to/fromDynamicvalues usingserde.
This is particularly useful when converting a Ruststructto aDynamicobject map and back. Engine::disable_symbolto surgically disable keywords and/or operators.Engine::register_custom_operatorto define a custom operator.Engine::register_custom_syntaxto define a custom syntax.- New low-level API
Engine::register_raw_fnandEngine::register_raw_fn_XXX. - New low-level API
Module::set_raw_fnmirroringEngine::register_raw_fn. AST::clone_functions_only,AST::clone_functions_only_filteredandAST::clone_statements_onlyto clone only part of anAST.- The boolean
^(XOR) operator is added. FnPtris exposed as the function pointer type.rhai::module_resolvers::ModuleResolversCollectionadded to try a list of module resolvers.- It is now possible to mutate the first argument of a module-qualified function call when the argument is a simple variable (but not a module constant).
- Many configuration/setting API's now returns
&mut Selfso that the calls can be chained. Stringparameters in functions are supported (but inefficiently).