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"
|
2021-09-03 04:18:50 +02:00
|
|
|
version = "1.0.5"
|
2019-09-18 12:21:07 +02:00
|
|
|
edition = "2018"
|
2020-09-09 03:12:28 +02:00
|
|
|
authors = ["Jonathan Turner", "Lukáš Hozda", "Stephen Chung", "jhwgh1968"]
|
2016-03-16 15:00:57 +01:00
|
|
|
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"
|
2016-03-16 15:00:57 +01:00
|
|
|
readme = "README.md"
|
2020-03-22 03:18:16 +01:00
|
|
|
license = "MIT OR Apache-2.0"
|
2021-03-12 06:26:47 +01:00
|
|
|
include = ["**/*.rs", "scripts/*.rhai", "**/*.md", "Cargo.toml"]
|
|
|
|
keywords = ["scripting", "scripting-engine", "scripting-language", "embedded"]
|
|
|
|
categories = ["no-std", "embedded", "wasm", "parser-implementations"]
|
2018-02-09 22:27:41 +01:00
|
|
|
|
2020-03-08 15:47:13 +01:00
|
|
|
[dependencies]
|
2021-01-16 04:26:44 +01:00
|
|
|
smallvec = { version = "1.6", default-features = false, features = ["union"] }
|
2021-03-21 16:51:24 +01:00
|
|
|
ahash = { version = "0.7", default-features = false }
|
2021-06-11 06:29:03 +02:00
|
|
|
num-traits = { version = "0.2", default-features = false }
|
2021-07-12 06:11:53 +02:00
|
|
|
smartstring = { version = "0.2.7", default-features = false }
|
2021-07-08 06:07:30 +02:00
|
|
|
rhai_codegen = { version = "1.0", path = "codegen", default-features = false }
|
2020-03-17 19:26:11 +01:00
|
|
|
|
2020-03-18 03:50:51 +01:00
|
|
|
[features]
|
2021-07-08 06:07:30 +02:00
|
|
|
default = ["ahash/std", "num-traits/std"]
|
2021-03-21 16:51:24 +01:00
|
|
|
unchecked = [] # unchecked arithmetic
|
|
|
|
sync = [] # restrict to only types that implement Send + Sync
|
2021-04-22 17:02:25 +02:00
|
|
|
no_position = [] # do not track position in the parser
|
2021-03-21 16:51:24 +01:00
|
|
|
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
|
2021-07-08 08:09:31 +02:00
|
|
|
decimal = ["rust_decimal"] # add the Decimal number type
|
2021-03-21 16:51:24 +01:00
|
|
|
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
|
2021-03-12 06:26:47 +01:00
|
|
|
unicode-xid-ident = ["unicode-xid"] # allow Unicode Standard Annex #31 for identifiers.
|
2021-07-08 08:09:31 +02:00
|
|
|
metadata = ["serde", "serde_json", "rhai_codegen/metadata"] # enable exporting functions metadata
|
2020-03-18 03:50:51 +01:00
|
|
|
|
2021-04-17 09:15:54 +02:00
|
|
|
no_std = ["no-std-compat", "num-traits/libm", "core-error", "libm", "ahash/compile-time-rng"]
|
2020-03-18 03:50:51 +01:00
|
|
|
|
2021-01-18 04:35:55 +01:00
|
|
|
# compiling for WASM
|
2021-03-12 06:26:47 +01:00
|
|
|
wasm-bindgen = ["instant/wasm-bindgen"]
|
|
|
|
stdweb = ["instant/stdweb"]
|
2021-01-18 04:35:55 +01:00
|
|
|
|
2021-05-08 16:59:33 +02:00
|
|
|
# internal feature flags - volatile
|
|
|
|
no_smartstring = [] # Do not use SmartString
|
|
|
|
|
2020-03-18 03:50:51 +01:00
|
|
|
[profile.release]
|
|
|
|
lto = "fat"
|
|
|
|
codegen-units = 1
|
2020-03-18 06:09:38 +01:00
|
|
|
#opt-level = "z" # optimize for size
|
|
|
|
#panic = 'abort' # remove stack backtrace for no-std
|
2020-03-18 03:50:51 +01:00
|
|
|
|
2021-04-17 09:15:54 +02:00
|
|
|
[dependencies.no-std-compat]
|
|
|
|
version = "0.4"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2021-04-17 09:15:54 +02:00
|
|
|
features = ["alloc"]
|
|
|
|
optional = true
|
|
|
|
|
2020-03-17 19:26:11 +01:00
|
|
|
[dependencies.libm]
|
2021-01-16 04:26:44 +01:00
|
|
|
version = "0.2"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2020-03-17 19:26:11 +01:00
|
|
|
optional = true
|
|
|
|
|
|
|
|
[dependencies.core-error]
|
2021-01-16 04:26:44 +01:00
|
|
|
version = "0.0"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2020-03-17 19:26:11 +01:00
|
|
|
features = ["alloc"]
|
|
|
|
optional = true
|
|
|
|
|
2020-07-03 11:19:55 +02:00
|
|
|
[dependencies.serde]
|
2021-01-16 04:26:44 +01:00
|
|
|
version = "1.0"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2020-07-19 16:44:00 +02:00
|
|
|
features = ["derive", "alloc"]
|
2020-07-03 11:19:55 +02:00
|
|
|
optional = true
|
|
|
|
|
2020-12-19 12:42:18 +01:00
|
|
|
[dependencies.serde_json]
|
2021-01-16 04:26:44 +01:00
|
|
|
version = "1.0"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2020-12-19 12:42:18 +01:00
|
|
|
features = ["alloc"]
|
|
|
|
optional = true
|
|
|
|
|
2020-07-29 01:25:37 +02:00
|
|
|
[dependencies.unicode-xid]
|
2021-01-16 04:26:44 +01:00
|
|
|
version = "0.2"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2020-07-29 01:25:37 +02:00
|
|
|
optional = true
|
|
|
|
|
2021-02-13 13:57:56 +01:00
|
|
|
[dependencies.rust_decimal]
|
2021-06-11 09:12:01 +02:00
|
|
|
version = "1.14.2"
|
2021-06-11 06:29:03 +02:00
|
|
|
default-features = false
|
2021-05-11 14:31:31 +02:00
|
|
|
features = ["maths"]
|
2021-02-13 13:57:56 +01:00
|
|
|
optional = true
|
|
|
|
|
2020-06-17 10:50:57 +02:00
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
2021-07-30 11:36:32 +02:00
|
|
|
instant = { version = "0.1.10" } # WASM implementation of std::time::Instant
|
2020-07-25 09:52:27 +02:00
|
|
|
|
2021-02-19 08:50:48 +01:00
|
|
|
[target.'cfg(target_arch = "wasm64")'.dependencies]
|
2021-07-30 11:36:32 +02:00
|
|
|
instant = { version = "0.1.10" } # WASM implementation of std::time::Instant
|
2021-02-19 08:50:48 +01:00
|
|
|
|
2020-07-25 09:52:27 +02:00
|
|
|
[package.metadata.docs.rs]
|
2021-03-24 12:27:38 +01:00
|
|
|
features = ["metadata", "serde", "internals", "decimal"] # compiling for no-std
|