Add bin-features to pull in all features for bin tools.
This commit is contained in:
parent
9fa6839380
commit
419ee45043
@ -17,7 +17,7 @@ Bug fixes
|
|||||||
Script-breaking changes
|
Script-breaking changes
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
* For consistency, the `export` statement no longer exports multiple variables.
|
* For consistency with the `import` statement, the `export` statement no longer exports multiple variables.
|
||||||
|
|
||||||
New features
|
New features
|
||||||
------------
|
------------
|
||||||
@ -33,6 +33,7 @@ Enhancements
|
|||||||
* The `no_module` feature now eliminates large sections of code via feature gates.
|
* The `no_module` feature now eliminates large sections of code via feature gates.
|
||||||
* Debug display of `AST` is improved.
|
* Debug display of `AST` is improved.
|
||||||
* `NativeCallContext::call_level()` is added to give the current nesting level of function calls.
|
* `NativeCallContext::call_level()` is added to give the current nesting level of function calls.
|
||||||
|
* A new feature, `bin-features`, pulls in all the required features for `bin` tools.
|
||||||
|
|
||||||
REPL tool changes
|
REPL tool changes
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -55,12 +55,16 @@ unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for ident
|
|||||||
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata
|
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"] # enable exporting functions metadata
|
||||||
debugging = ["internals"] # enable debugging
|
debugging = ["internals"] # enable debugging
|
||||||
|
|
||||||
|
# compiling for no-std
|
||||||
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"]
|
||||||
|
|
||||||
# compiling for WASM
|
# compiling for WASM
|
||||||
wasm-bindgen = ["instant/wasm-bindgen"]
|
wasm-bindgen = ["instant/wasm-bindgen"]
|
||||||
stdweb = ["instant/stdweb"]
|
stdweb = ["instant/stdweb"]
|
||||||
|
|
||||||
|
# compiling bin tools
|
||||||
|
bin-features = ["decimal", "metadata", "serde", "debugging", "rustyline"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rhai-repl"
|
name = "rhai-repl"
|
||||||
required-features = ["rustyline"]
|
required-features = ["rustyline"]
|
||||||
|
@ -9,32 +9,29 @@ Tools for running Rhai scripts.
|
|||||||
| [`rhai-repl`](https://github.com/rhaiscript/rhai/blob/main/src/bin/rhai-repl.rs) | `rustyline` | simple REPL that interactively evaluates statements |
|
| [`rhai-repl`](https://github.com/rhaiscript/rhai/blob/main/src/bin/rhai-repl.rs) | `rustyline` | simple REPL that interactively evaluates statements |
|
||||||
| [`rhai-dbg`](https://github.com/rhaiscript/rhai/blob/main/src/bin/rhai-dbg.rs) | `debugging` | the _Rhai Debugger_ |
|
| [`rhai-dbg`](https://github.com/rhaiscript/rhai/blob/main/src/bin/rhai-dbg.rs) | `debugging` | the _Rhai Debugger_ |
|
||||||
|
|
||||||
|
There is a feature called `bin-features` which automatically includes all the necessary features
|
||||||
|
required for building these tools.
|
||||||
|
|
||||||
|
|
||||||
How to Run
|
How to Run
|
||||||
----------
|
----------
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo run --bin sample_app_to_run
|
cargo run --features bin-features --bin sample_app_to_run
|
||||||
```
|
|
||||||
|
|
||||||
or with required features
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cargo run --bin sample_app_to_run --features feature1,feature2,feature3
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
How to Install
|
How to Install
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
To install these all tools (with [`decimal`] and [`metadata`] support), use the following command:
|
To install these all tools (with full features), use the following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install --path . --bins --features decimal,metadata,debugging,rustyline
|
cargo install --path . --bins --features bin-features
|
||||||
```
|
```
|
||||||
|
|
||||||
or specifically:
|
or specifically:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install --path . --bin rhai-run --features decimal,metadata,debugging,rustyline
|
cargo install --path . --bin rhai-run --features bin-features
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user