Turn on smartstring/serde with metadata.
This commit is contained in:
parent
87d48948f9
commit
504e695956
@ -44,6 +44,7 @@ Enhancements
|
|||||||
* `SmartString` now uses `LazyCompact` instead of `Compact` to minimize allocations.
|
* `SmartString` now uses `LazyCompact` instead of `Compact` to minimize allocations.
|
||||||
* Added `pop` for strings.
|
* Added `pop` for strings.
|
||||||
* Added `ImmutableString::ptr_eq` to test if two strings point to the same allocation.
|
* 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
|
### `Scope` API
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ no_closure = [] # no automatic sharing and capture of anonymous
|
|||||||
no_module = [] # no modules
|
no_module = [] # no modules
|
||||||
internals = [] # expose internal data structures
|
internals = [] # expose internal data structures
|
||||||
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
|
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"]
|
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"]
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ The [`scripts`](https://github.com/rhaiscript/rhai/tree/master/scripts) subdirec
|
|||||||
Below is the standard _Fibonacci_ example for scripting languages:
|
Below is the standard _Fibonacci_ example for scripting languages:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// This Rhai script calculates the n-th Fibonacci number using a really dumb algorithm
|
// This Rhai script calculates the n-th Fibonacci number using a
|
||||||
// to test the speed of the scripting engine.
|
// really dumb algorithm to test the speed of the scripting engine.
|
||||||
|
|
||||||
const TARGET = 28;
|
const TARGET = 28;
|
||||||
const REPEAT = 5;
|
const REPEAT = 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user