rhai/Cargo.toml
2020-12-30 21:13:31 +08:00

106 lines
2.9 KiB
TOML

[workspace]
members = [
".",
"codegen"
]
[package]
name = "rhai"
version = "0.19.10"
edition = "2018"
authors = ["Jonathan Turner", "Lukáš Hozda", "Stephen Chung", "jhwgh1968"]
description = "Embedded scripting for Rust"
homepage = "https://schungx.github.io/rhai"
repository = "https://github.com/jonathandturner/rhai"
readme = "README.md"
license = "MIT OR Apache-2.0"
include = [
"**/*.rs",
"scripts/*.rhai",
"Cargo.toml"
]
keywords = [ "scripting" ]
categories = [ "no-std", "embedded", "wasm", "parser-implementations" ]
[dependencies]
smallvec = { version = "1.4.2", default-features = false }
rhai_codegen = { version = "0.3", path = "codegen" }
[features]
default = []
unchecked = [] # unchecked arithmetic
sync = [] # restrict to only types that implement Send + Sync
no_optimize = [] # no script optimizer
no_float = [] # no floating-point
f32_float = [] # set FLOAT=f32
only_i32 = [] # set INT=i32 (useful for 32-bit systems)
only_i64 = [] # set INT=i64 (default) and disable support for all other integer types
no_index = [] # no arrays and indexing
no_object = [] # no custom objects
no_function = [ "no_closure" ] # no script-defined functions (meaning no closures)
no_closure = [] # no automatic sharing and capture of anonymous functions to external variables
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"] # enables exporting functions metadata to JSON
# compiling for no-std
no_std = [ "smallvec/union", "num-traits/libm", "hashbrown", "core-error", "libm", "ahash" ]
[profile.release]
lto = "fat"
codegen-units = 1
#opt-level = "z" # optimize for size
#panic = 'abort' # remove stack backtrace for no-std
[dependencies.libm]
version = "0.2.1"
default_features = false
optional = true
[dependencies.num-traits]
version = "0.2.11"
default-features = false
optional = true
[dependencies.core-error]
version = "0.0.0"
default_features = false
features = ["alloc"]
optional = true
[dependencies.hashbrown]
version = "0.7.1"
default-features = false
features = ["ahash", "nightly", "inline-more"]
optional = true
[dependencies.ahash]
version = "0.3.2"
default-features = false
features = ["compile-time-rng"]
optional = true
[dependencies.serde]
version = "1.0.116"
default_features = false
features = ["derive", "alloc"]
optional = true
[dependencies.serde_json]
version = "1.0.60"
default_features = false
features = ["alloc"]
optional = true
[dependencies.unicode-xid]
version = "0.2.1"
default_features = false
optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
instant= { version = "0.1.7", features = ["wasm-bindgen"] } # WASM implementation of std::time::Instant
[package.metadata.docs.rs]
features = [ "serde", "internals" ]