Turn on smartstring/serde with metadata.

This commit is contained in:
Stephen Chung 2021-09-28 19:19:17 +08:00
parent 87d48948f9
commit 504e695956
3 changed files with 4 additions and 3 deletions

View File

@ -44,6 +44,7 @@ Enhancements
* `SmartString` now uses `LazyCompact` instead of `Compact` to minimize allocations.
* Added `pop` for strings.
* Added `ImmutableString::ptr_eq` to test if two strings point to the same allocation.
* The `serde` feature of `SmartString` is turned on under `metadata` to make `Map` serializable.
### `Scope` API

View File

@ -40,7 +40,7 @@ no_closure = [] # no automatic sharing and capture of anonymous
no_module = [] # no modules
internals = [] # expose internal data structures
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
metadata = ["serde", "serde_json", "rhai_codegen/metadata"] # enable exporting functions metadata
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"]

View File

@ -79,8 +79,8 @@ The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirec
Below is the standard _Fibonacci_ example for scripting languages:
```js
// This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm
// to test the speed of the scripting engine.
// This Rhai script calculates the n-th Fibonacci number using a
// really dumb algorithm to test the speed of the scripting engine.
const TARGET = 28;
const REPEAT = 5;