Repository navigation
v.0.16.1
The major new feature in this version is OOP - well, poor man's OOP, that is.
Version 0.16.1 released to crates.io
The README is officially transferred to The Rhai Book.
An online Playground is available.
Breaking changes
- The trait function
ModuleResolver::resolveno longer takes aScopeas argument. - Functions defined in script now differentiates between using method-call style and normal function-call style.
The method-call style will bind the object to thethisparameter instead of consuming the first parameter. - Imported modules are no longer stored in the
Scope.Scope::push_moduleis removed.
Therefore, cannot rely on module imports to persist across invocations using aScope. AST::retain_functionsis used for another purpose. The oldAST::retain_functionsis renamed toAST::clear_statements.
New features
- Support for function pointers via
Fn(name)andFn.call(...)syntax - a poor man's first-class function. - Support for calling script-defined functions in method-call style with
thisbinding to the object. - Special support in object maps for OOP.
- Expanded the
ASTAPI for fine-tuned manipulation of functions.
Enhancements
- The Rhai Book is online. Most content in the original
READMEwas transferred to the Book. - New feature
internalsto expose internal data structures (e.g. the AST nodes).