brainwires-code-interpreters 0.6.0

Sandboxed code execution for multiple languages (Rhai, Lua, JavaScript, Python)
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91"
name = "brainwires-code-interpreters"
version = "0.6.0"
authors = ["Brainwires"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Sandboxed code execution for multiple languages (Rhai, Lua, JavaScript, Python)"
homepage = "https://github.com/Brainwires/brainwires-framework"
documentation = "https://docs.rs/brainwires-code-interpreters"
readme = "README.md"
keywords = [
    "code-execution",
    "sandbox",
    "javascript",
    "python",
    "interpreter",
]
categories = ["development-tools"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/Brainwires/brainwires-framework"
resolver = "2"

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[features]
all-languages = [
    "rhai",
    "lua",
    "javascript",
]
default = [
    "native",
    "rhai",
    "lua",
]
javascript = ["dep:boa_engine"]
lua = ["dep:mlua"]
native = []
rhai = ["dep:rhai"]
wasm = [
    "wasm-bindgen",
    "js-sys",
    "web-sys",
    "getrandom/js",
    "serde-wasm-bindgen",
]

[lib]
name = "brainwires_code_interpreters"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[example]]
name = "multi_language"
path = "examples/multi_language.rs"
required-features = [
    "rhai",
    "lua",
]

[[test]]
name = "executor"
path = "tests/executor.rs"

[[test]]
name = "javascript_tests"
path = "tests/javascript_tests.rs"

[[test]]
name = "lua_tests"
path = "tests/lua_tests.rs"

[[test]]
name = "python_tests"
path = "tests/python_tests.rs"

[[test]]
name = "rhai_tests"
path = "tests/rhai_tests.rs"

[dependencies.boa_engine]
version = "0.21"
optional = true

[dependencies.getrandom]
version = "0.2"
optional = true

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.mlua]
version = "0.10.3"
features = [
    "lua54",
    "vendored",
]
optional = true

[dependencies.rhai]
version = "1.20"
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde-wasm-bindgen]
version = "0.6"
optional = true

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2.0"

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.web-sys]
version = "0.3"
features = ["console"]
optional = true

[dev-dependencies.tokio]
version = "1"
features = [
    "rt",
    "macros",
]

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom_03]
version = "0.3"
features = ["wasm_js"]
package = "getrandom"

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2"
features = ["js"]