rhai/Cargo.toml

155 lines
6.2 KiB
TOML
Raw Normal View History

2020-09-08 23:03:38 +02:00
[workspace]
2021-03-12 06:26:47 +01:00
members = [".", "codegen"]
2020-09-08 23:03:38 +02:00
2016-02-29 22:43:45 +01:00
[package]
name = "rhai"
2022-11-12 03:27:31 +01:00
version = "1.12.0"
2022-08-27 11:28:59 +02:00
rust-version = "1.61.0"
2019-09-18 12:21:07 +02:00
edition = "2018"
2022-07-21 02:35:56 +02:00
resolver = "2"
authors = ["Jonathan Turner", "Lukáš Hozda", "Stephen Chung", "jhwgh1968"]
description = "Embedded scripting for Rust"
2021-02-27 05:52:20 +01:00
homepage = "https://rhai.rs"
2021-01-14 12:07:03 +01:00
repository = "https://github.com/rhaiscript"
readme = "README.md"
2020-03-22 03:18:16 +01:00
license = "MIT OR Apache-2.0"
include = ["/src/**/*", "/Cargo.toml", "/README.md", "LICENSE*"]
2021-03-12 06:26:47 +01:00
keywords = ["scripting", "scripting-engine", "scripting-language", "embedded"]
categories = ["no-std", "embedded", "wasm", "parser-implementations"]
[dependencies]
2022-08-24 17:17:12 +02:00
smallvec = { version = "1.7", default-features = false, features = ["union", "const_new", "const_generics"] }
2022-11-11 08:01:54 +01:00
ahash = { version = "0.8.2", default-features = false, features = ["compile-time-rng"] }
num-traits = { version = "0.2", default-features = false }
2022-02-25 04:42:59 +01:00
bitflags = { version = "1", default-features = false }
2022-02-25 01:24:22 +01:00
smartstring = { version = "1", default-features = false }
2022-12-03 10:03:15 +01:00
rhai_codegen = { version = "1.5.0", path = "codegen", default-features = false }
2022-01-30 02:41:51 +01:00
no-std-compat = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
libm = { version = "0.2", default-features = false, optional = true }
2022-11-11 08:07:26 +01:00
hashbrown = { version = "0.13", optional = true }
2022-01-30 02:41:51 +01:00
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 }
getrandom = { version = "0.2", optional = true }
2022-07-17 12:49:12 +02:00
rustyline = { version = "10", optional = true }
2022-12-22 02:33:12 +01:00
document-features = { version = "0.2", optional = true }
2020-03-17 19:26:11 +01:00
[dev-dependencies]
2022-11-22 08:38:16 +01:00
rmp-serde = "1.1"
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
2020-03-18 03:50:51 +01:00
[features]
2022-12-22 02:33:12 +01:00
## Default features: `std`, uses runtime random numbers for hashing.
2022-10-12 02:13:27 +02:00
default = ["std", "ahash/runtime-rng"] # ahash/runtime-rng trumps ahash/compile-time-rng
2022-12-22 02:33:12 +01:00
## Standard features: uses compile-time random number for hashing.
2022-10-12 02:13:27 +02:00
std = ["ahash/std", "num-traits/std", "smartstring/std"]
2022-12-22 02:33:12 +01:00
#! ### Enable Special Functionalities
## Require that all data types implement `Send + Sync` (for multi-threaded usage).
sync = []
## Add support for the [`Decimal`](https://crates.io/crates/rust_decimal) data type (acts as the system floating-point type under `no_float`).
decimal = ["rust_decimal"]
## Enable serialization/deserialization of Rhai data types via [`serde`](https://crates.io/crates/serde).
serde = ["dep:serde", "smartstring/serde", "smallvec/serde"]
## Allow [Unicode Standard Annex #31](https://unicode.org/reports/tr31/) for identifiers.
unicode-xid-ident = ["unicode-xid"]
## Enable functions metadata (including doc-comments); implies [`serde`](#feature-serde).
metadata = ["serde", "serde_json", "rhai_codegen/metadata", "smartstring/serde"]
## Expose internal data structures (e.g. `AST` nodes).
internals = []
## Enable the debugging interface (implies [`internals`](#feature-internals)).
debugging = ["internals"]
## Features and dependencies required by `bin` tools: `decimal`, `metadata`, `serde`, `debugging` and [`rustyline`](https://crates.io/crates/rustyline).
bin-features = ["decimal", "metadata", "serde", "debugging", "rustyline"]
#! ### System Configuration Features
## Use `f32` instead of `f64` as the system floating-point number type.
f32_float = []
## Use `i32` instead of `i64` for the system integer number type (useful for 32-bit architectures).
## All other integer types (e.g. `u8`) are disabled.
only_i32 = []
## Disable all integer types (e.g. `u8`) other than `i64`.
only_i64 = []
#! ### Disable Language Features
## Remove support for floating-point numbers.
no_float = []
## Remove support for arrays and indexing.
no_index = []
## Remove support for custom types, properties, method-style calls and object maps.
no_object = []
## Remove support for time-stamps.
no_time = []
## Remove support for script-defined functions (implies [`no_closure`](#feature-no_closure)).
no_function = ["no_closure"]
## Remove support for capturing external variables in anonymous functions (i.e. closures).
no_closure = []
## Remove support for loading external modules.
no_module = []
## Remove support for custom syntax.
no_custom_syntax = []
#! ### Performance-Related Features
## Disable all safety checks.
unchecked = []
## Do not track position when parsing.
no_position = []
## Disable the script optimizer.
no_optimize = []
#! ### Compiling for `no-std`
## Turn on `no-std` compilation (nightly only).
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "hashbrown", "no_time"]
#! ### JavaScript Interface for WASM
## Use [`wasm-bindgen`](https://crates.io/crates/wasm-bindgen) as JavaScript interface.
wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"]
## Use [`stdweb`](https://crates.io/crates/stdweb) as JavaScript interface.
stdweb = ["getrandom/js", "instant/stdweb"]
2022-01-30 02:41:51 +01:00
[[bin]]
name = "rhai-repl"
required-features = ["rustyline"]
[[bin]]
name = "rhai-run"
[[bin]]
name = "rhai-dbg"
required-features = ["debugging"]
[[example]]
name = "serde"
required-features = ["serde"]
2022-07-25 19:01:06 +02:00
[[example]]
name = "definitions"
required-features = ["metadata", "internals"]
2022-07-25 19:01:06 +02:00
2020-03-18 03:50:51 +01:00
[profile.release]
lto = "fat"
codegen-units = 1
#opt-level = "z" # optimize for size
#panic = 'abort' # remove stack backtrace for no-std
2020-03-18 03:50:51 +01:00
2022-01-12 01:12:28 +01:00
[target.'cfg(target_family = "wasm")'.dependencies]
instant = { version = "0.1.10" } # WASM implementation of std::time::Instant
2021-02-19 08:50:48 +01:00
[package.metadata.docs.rs]
2022-12-22 02:33:12 +01:00
features = ["document-features", "metadata", "serde", "internals", "decimal", "debugging"]
[patch.crates-io]
# Notice that a custom modified version of `rustyline` is used which supports bracketed paste on Windows.
# This can be moved to the official version when bracketed paste is added.
2022-07-17 12:49:12 +02:00
rustyline = { git = "https://github.com/schungx/rustyline", branch = "v10" }