Use required-features for bin tools.
This commit is contained in:
70
Cargo.toml
70
Cargo.toml
@@ -15,22 +15,21 @@ include = ["**/*.rs", "scripts/*.rhai", "**/*.md", "Cargo.toml"]
|
||||
keywords = ["scripting", "scripting-engine", "scripting-language", "embedded"]
|
||||
categories = ["no-std", "embedded", "wasm", "parser-implementations"]
|
||||
|
||||
[lib]
|
||||
name = "rhai"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "rhai-repl"
|
||||
path = "src/bin/rhai-repl.rs"
|
||||
required-features = ["rustyline"]
|
||||
|
||||
[dependencies]
|
||||
smallvec = { version = "1.7", default-features = false, features = ["union", "const_new" ] }
|
||||
ahash = { version = "0.7", default-features = false }
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
smartstring = { version = "0.2.8", default-features = false }
|
||||
rhai_codegen = { version = "1.2", path = "codegen", default-features = false }
|
||||
rustyline = { versoin = "9", optional = true }
|
||||
|
||||
no-std-compat = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
|
||||
libm = { version = "0.2", default-features = false, optional = true }
|
||||
core-error = { version = "0.0", default-features = false, features = ["alloc"], optional = true }
|
||||
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
|
||||
serde_json = { version = "1.0", default-features = false, features = ["alloc"], optional = true }
|
||||
unicode-xid = { version = "0.2", default-features = false, optional = true }
|
||||
rust_decimal = { version = "1.16", default-features = false, features = ["maths"], optional = true }
|
||||
rustyline = { version = "9", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_bytes = "0.11"
|
||||
@@ -62,52 +61,23 @@ no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compi
|
||||
wasm-bindgen = ["instant/wasm-bindgen"]
|
||||
stdweb = ["instant/stdweb"]
|
||||
|
||||
[[bin]]
|
||||
name = "rhai-repl"
|
||||
required-features = ["rustyline"]
|
||||
|
||||
[[bin]]
|
||||
name = "rhai-run"
|
||||
|
||||
[[bin]]
|
||||
name = "rhai-dbg"
|
||||
required-features = ["debugging"]
|
||||
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
codegen-units = 1
|
||||
#opt-level = "z" # optimize for size
|
||||
#panic = 'abort' # remove stack backtrace for no-std
|
||||
|
||||
[dependencies.no-std-compat]
|
||||
version = "0.4"
|
||||
default-features = false
|
||||
features = ["alloc"]
|
||||
optional = true
|
||||
|
||||
[dependencies.libm]
|
||||
version = "0.2"
|
||||
default-features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.core-error]
|
||||
version = "0.0"
|
||||
default-features = false
|
||||
features = ["alloc"]
|
||||
optional = true
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0"
|
||||
default-features = false
|
||||
features = ["derive", "alloc"]
|
||||
optional = true
|
||||
|
||||
[dependencies.serde_json]
|
||||
version = "1.0"
|
||||
default-features = false
|
||||
features = ["alloc"]
|
||||
optional = true
|
||||
|
||||
[dependencies.unicode-xid]
|
||||
version = "0.2"
|
||||
default-features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.rust_decimal]
|
||||
version = "1.16"
|
||||
default-features = false
|
||||
features = ["maths"]
|
||||
optional = true
|
||||
|
||||
[target.'cfg(target_family = "wasm")'.dependencies]
|
||||
instant = { version = "0.1.10" } # WASM implementation of std::time::Instant
|
||||
|
||||
|
Reference in New Issue
Block a user