Automatic global module.

This commit is contained in:
Stephen Chung
2021-04-17 17:25:35 +08:00
parent 9a409b5b49
commit 1be7e60be2
4 changed files with 52 additions and 2 deletions

View File

@@ -4,12 +4,24 @@ Rhai Release Notes
Version 0.20.1
==============
This version enables functions to access constants declared at global level via the special `global` module.
Breaking changes
----------------
* `Dynamic::is_shared` and `Dynamic::is_locked` are removed under the `no_closure` feature. They used to always return `false`.
* `Engine::call_fn` now evaluates the `AST` before calling the function.
Enhancements
------------
* The crate [`no-std-compat`](https://crates.io/crates/no_std_compat) is used to compile for `no-std`. This removes the need to use a special `crate::stdlib` namespace for `std` imports.
New features
------------
* A module called `global` is automatically created to hold global-level constants, which can then be accessed from functions.
Version 0.20.0
==============