Cargo Features

[dependencies]
quad-compat-rhai = { version = "1.4.0", default-features = false, features = ["std", "unchecked", "sync", "no_position", "no_optimize", "no_float", "f32_float", "only_i32", "only_i64", "decimal", "no_index", "no_object", "no_function", "no_closure", "no_module", "internals", "unicode-xid-ident", "metadata", "no_std"] }
default = std

The std feature is set by default whenever quad-compat-rhai is added without default-features = false somewhere in the dependency tree.

std default

Enables std of num-traits

unchecked

unchecked arithmetic

sync

restrict to only types that implement Send + Sync

Affects custom_syntax::FnCustomSyntaxEval, custom_syntax::FnCustomSyntaxParse, native::SendSync, native::LockGuard, native::FnAny, native::FnPlugin, native::OnProgressCallback, native::OnPrintCallback, native::OnDebugCallback, native::OnParseTokenCallback, native::OnVarCallback, dynamic::Variant

no_position

do not track position in the parser

no_optimize

no script optimizer

no_float

no floating-point

f32_float

set FLOAT=f32

Affects quad-compat-rhai::FLOAT

only_i32

set INT=i32 (useful for 32-bit systems)

Affects quad-compat-rhai::INT, math_basic::MAX_INT

only_i64

set INT=i64 (default) and disable support for all other integer types

decimal = rust_decimal

add the Decimal number type

Affects arithmetic::decimal_functions

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_function?

no automatic sharing and capture of anonymous functions to external variables

no_module

no modules

internals

expose internal data structures

Affects quad-compat-rhai::Identifier, quad-compat-rhai::StaticVec

unicode-xid-ident = unicode-xid

allow Unicode Standard Annex #31 for identifiers.

Affects tokenizer::is_id_first_alphabetic, tokenizer::is_id_continue

metadata = serde, serde_json

enable exporting functions metadata

Enables metadata of rhai_codegen ^1.2, serde of smartstring ^0.2.8

Affects ast::ScriptFnDef.comments, ast::ScriptFnMetadata.comments, register::RegisterNativeFunction.param_names, register::RegisterNativeFunction.return_type, register::RegisterNativeFunction.return_type_name, module::FuncInfo.param_names, tokenizer::is_doc_comment

no_std = core-error, libm, no-std-compat

Enables libm of num-traits

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

core-error no_std?
libm no_std?
no-std-compat no_std?
rust_decimal decimal?
serde metadata?

Affects quad-compat-rhai::serde

serde_json metadata?
unicode-xid unicode-xid-ident?