[workspace]
members = [".", "codegen"]
[package]
name = "rhai"
version = "1.20.0"
rust-version = "1.66.0"
edition = "2018"
resolver = "2"
authors = ["Jonathan Turner", "Lukáš Hozda", "Stephen Chung", "jhwgh1968"]
description = "Embedded scripting for Rust"
homepage = "https://rhai.rs"
repository = "https://github.com/rhaiscript/rhai"
readme = "README.md"
license = "MIT OR Apache-2.0"
include = ["/src/**/*", "/Cargo.toml", "/README.md", "LICENSE*"]
keywords = ["scripting", "scripting-engine", "scripting-language", "embedded"]
categories = ["no-std", "embedded", "wasm", "parser-implementations"]
[dependencies]
smallvec = { version = "1.7.0", default-features = false, features = ["union", "const_new", "const_generics"] }
thin-vec = { version = "0.2.13", default-features = false }
ahash = { version = "0.8.2", default-features = false, features = ["compile-time-rng"] }
num-traits = { version = "0.2.0", default-features = false }
once_cell = { version = "1.20.1", default-features = false, features = ["race", "portable-atomic", "alloc"] }
bitflags = { version = "2.0.0", default-features = false }
smartstring = { version = "1.0.0", default-features = false }
rhai_codegen = { version = "2.1.0", path = "codegen" }
no-std-compat = { git = "https://gitlab.com/jD91mZM2/no-std-compat", version = "0.4.1", default-features = false, features = ["alloc"], optional = true }
libm = { version = "0.2.0", default-features = false, optional = true }
hashbrown = { version = "0.15.0", optional = true }
core-error = { version = "0.0.0", default-features = false, features = ["alloc"], optional = true }
serde = { version = "1.0.96", default-features = false, features = ["derive", "alloc"], optional = true }
serde_json = { version = "1.0.45", default-features = false, features = ["alloc"], optional = true }
unicode-xid = { version = "0.2.0", default-features = false, optional = true }
rust_decimal = { version = "1.16.0", default-features = false, features = ["maths"], optional = true }
getrandom = { version = "0.2.0", optional = true }
rustyline = { version = "13.0.0", optional = true }
document-features = { version = "0.2.0", optional = true }
arbitrary = { version = "1.3.2", optional = true, features = ["derive"] }
[dev-dependencies]
rmp-serde = "1.1.0"
serde_json = { version = "1.0.45", default-features = false, features = ["alloc"] }
[features]
default = ["std", "ahash/runtime-rng"]
std = ["once_cell/std", "ahash/std", "num-traits/std", "smartstring/std"]
sync = ["no-std-compat/compat_sync"]
decimal = ["rust_decimal"]
serde = ["dep:serde", "smartstring/serde", "smallvec/serde", "thin-vec/serde"]
unicode-xid-ident = ["unicode-xid"]
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"]
internals = []
debugging = ["internals"]
bin-features = ["decimal", "metadata", "serde", "debugging", "rustyline"]
fuzz = ["arbitrary", "rust_decimal/rust-fuzz", "serde"]
f32_float = []
only_i32 = []
only_i64 = []
no_float = []
no_index = []
no_object = []
no_time = []
no_function = ["no_closure"]
no_closure = []
no_module = []
no_custom_syntax = []
unchecked = []
no_position = []
no_optimize = []
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "hashbrown", "no_time"]
wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"]
stdweb = ["getrandom/js", "instant/stdweb"]
unstable = []
testing-environ = []
[[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
[target.'cfg(target_family = "wasm")'.dependencies]
instant = { version = "0.1.10" }
[package.metadata.docs.rs]
features = ["document-features", "metadata", "serde", "internals", "decimal", "debugging"]
[patch.crates-io]
rustyline = { git = "https://github.com/schungx/rustyline", branch = "v13" }