Add writeup on Rhai usage scenarios.

This commit is contained in:
Stephen Chung
2020-05-31 15:55:02 +08:00
parent 840afe74bb
commit 697bb39a7f
2 changed files with 19 additions and 7 deletions

View File

@@ -13,13 +13,13 @@ Bug fixes
---------
* Indexing with an index or dot expression now works property (it compiled wrongly before).
For example, `let s = "hello"; s[s.len-1] = 'x';` now works property instead of an error.
For example, `let s = "hello"; s[s.len-1] = 'x';` now works property instead of causing a runtime error.
Breaking changes
----------------
* `Engine::compile_XXX` functions now return `ParseError` instead of `Box<ParseError>`.
* The `RegisterDynamicFn` trait is merged into the `RegisterResutlFn` trait which now always returns
* The `RegisterDynamicFn` trait is merged into the `RegisterResultFn` trait which now always returns
`Result<Dynamic, Box<EvalAltResult>>`.
* Default maximum limit on levels of nested function calls is fine-tuned and set to a different value.
* Some operator functions are now built in (see _Speed enhancements_ below), so they are available even
@@ -62,7 +62,7 @@ Speed enhancements
in a full clone of `a` before taking the length and throwing the copy away. Now, `a` is simply passed by reference,
avoiding the cloning altogether.
* A custom hasher simply passes through `u64` keys without hashing to avoid function call hash keys
(which as by themselves `u64`) being hashed twice.
(which are by themselves `u64`) being hashed twice.
Version 0.14.1