The major new feature for this version is Plugins support, powered by procedural macros.
Plugins make it extremely easy to develop and register Rust functions with an Engine.
if statement with an empty true block would not evaluate the false block. This is now fixed.
Fixes a bug in Module::set_fn_4_mut.
Module API's now properly handle &str and String parameters.
Indexers are available under no_object.
Registered operator-assignment functions (e.g. +=) now work correctly.
Breaking changes
Engine::register_set_result and Engine::register_indexer_set_result now take a function that returns Result<(), Box<EvalAltResult>>.
Engine::register_indexer_XXX and Module::set_indexer_XXX panic when the type is Array, Map or String.
EvalAltResult has a new variant ErrorInModule which holds errors when loading an external module.
Module::eval_ast_as_new now takes an extra boolean parameter, indicating whether to encapsulate the entire module into a separate namespace.
Functions in FileModuleResolver loaded modules now can cross-call each other in addition to functions in the global namespace. For the old behavior, use MergingFileModuleResolver instead.
New EvalAltResult::ErrorInModule variant capturing errors when loading a module from a script file.
New features
Plugins support via procedural macros.
Scripted functions are allowed in packages.
parse_int and parse_float functions for parsing numbers; split function for splitting strings.
AST::iter_functions and Module::iter_script_fn_info to iterate functions.
Functions iteration functions for AST and Module now take FnMut instead of Fn.
New FileModuleResolver that encapsulates the entire AST of the module script, allowing function cross-calling. The old version is renamed MergingFileModuleResolver.
+ and - operators for timestamps to increment/decrement by seconds.
The major new feature for this version is Plugins support, powered by procedural macros.
Plugins make it extremely easy to develop and register Rust functions with an Engine.
Bug fixes
if statement with an empty true block would not evaluate the false block. This is now fixed.
Fixes a bug in Module::set_fn_4_mut.
Module API's now properly handle &str and String parameters.
Indexers are available under no_object.
Registered operator-assignment functions (e.g. +=) now work correctly.
Breaking changes
Engine::register_set_result and Engine::register_indexer_set_result now take a function that returns Result<(), Box<EvalAltResult>>.
Engine::register_indexer_XXX and Module::set_indexer_XXX panic when the type is Array, Map or String.
EvalAltResult has a new variant ErrorInModule which holds errors when loading an external module.
Module::eval_ast_as_new now takes an extra boolean parameter, indicating whether to encapsulate the entire module into a separate namespace.
Functions in FileModuleResolver loaded modules now can cross-call each other in addition to functions in the global namespace. For the old behavior, use MergingFileModuleResolver instead.
New EvalAltResult::ErrorInModule variant capturing errors when loading a module from a script file.
New features
Plugins support via procedural macros.
Scripted functions are allowed in packages.
parse_int and parse_float functions for parsing numbers; split function for splitting strings.
AST::iter_functions and Module::iter_script_fn_info to iterate functions.
Functions iteration functions for AST and Module now take FnMut instead of Fn.
New FileModuleResolver that encapsulates the entire AST of the module script, allowing function cross-calling. The old version is renamed MergingFileModuleResolver.
+ and - operators for timestamps to increment/decrement by seconds.
Commits
fca908e Merge pull request #249 from schungx/master
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps rhai from 0.18.3 to 0.19.0.
Release notes
Sourced from rhai's releases.
Changelog
Sourced from rhai's changelog.
Commits
fca908e
Merge pull request #249 from schungx/master07fdd1b
Fix image url link.45a290f
Change doc test from no_run to ignore.2290c72
Fix tests.cbc3d87
Revise docs for 0.19.0.a04ed02
Simplify macro system and update doc comments.e526b53
No need to merge module if empty.c7dfbd4
Restore call_fn_dynamic.69054f1
Change lib to &Module.ea78fa2
Change SharedPluginFunction to Shared<FnPlugin>Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)