Add call_native_fn for context.
This commit is contained in:
35
CHANGELOG.md
35
CHANGELOG.md
@@ -11,23 +11,44 @@ Bug fixes
|
||||
* `import` statements inside `eval` no longer cause errors in subsequent code.
|
||||
* Functions marked `global` in `import`ed modules with no alias names now work properly.
|
||||
|
||||
Speed Improvements
|
||||
------------------
|
||||
|
||||
* Due to a code refactor, built-in operators for standard types now run even faster, in certain cases by 20-30%.
|
||||
|
||||
New features
|
||||
------------
|
||||
|
||||
### Stable hashing
|
||||
|
||||
* It is now possible to specify a fixed _seed_ for use with the `ahash` hasher, via an environment variable, in order to force stable (i.e. deterministic) hashes for function signatures. This is necessary when using Rhai across shared-library boundaries.
|
||||
* A build script is now used to extract the environment variable (`RHAI_AHASH_SEED`) and splice it into the source code before compilation.
|
||||
* It is now possible to specify a fixed _seed_ for use with the `ahash` hasher, via an environment variable, in order to force stable (i.e. deterministic) hashes for function signatures.
|
||||
* This is necessary when using Rhai across shared-library boundaries.
|
||||
* A build script is used to extract the environment variable (`RHAI_AHASH_SEED`) and splice it into the source code before compilation.
|
||||
|
||||
### Serializable `Scope`
|
||||
|
||||
* `Scope` is now serializable and deserializable via `serde`.
|
||||
|
||||
### Call native Rust functions in `NativeCallContext`
|
||||
|
||||
* `NativeCallContext::call_native_fn` is added to call registered native Rust functions only.
|
||||
* `NativeCallContext::call_native_fn_raw` is added as the advanced version.
|
||||
* This is often desirable as Rust functions typically do not want a similar-named scripted function to hijack the process -- which will cause brittleness.
|
||||
|
||||
### Custom syntax improvements
|
||||
|
||||
* The look-ahead symbol for custom syntax now renders a string literal in quotes (instead of the generic term `string`).
|
||||
* This facilitates more accurate parsing by separating strings and identifiers.
|
||||
|
||||
### Limits API
|
||||
|
||||
* Methods returning maximum limits (e.g. `Engine::max_string_len`) are now available even under `unchecked`.
|
||||
* This helps avoid the proliferation of unnecessary feature flags in third-party library code.
|
||||
|
||||
Enhancements
|
||||
------------
|
||||
|
||||
* The look-ahead symbol for custom syntax now renders a string literal in quotes (instead of the generic term `string`). This facilitates more accurate parsing by separating strings and identifiers.
|
||||
* Due to a code refactor, built-in operators for standard types now run even faster, in certain cases by 20-30%.
|
||||
* `Scope` is now serializable and deserializable via `serde`.
|
||||
* `Scope` now contains a const generic parameter that allows specifying how many entries to be kept inline.
|
||||
* `parse_json` function is added to parse a JSON string into an object map.
|
||||
* Methods returning maximum limits (e.g. `Engine::max_string_len`) are now available even under `unchecked` in order to avoid unnecessary feature flags in third-party library code.
|
||||
|
||||
|
||||
Version 1.10.1
|
||||
|
Reference in New Issue
Block a user