Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

1.4 KB
Raw Blame
[package]
name = "boxlite-node"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
publish = false
description = "Node.js bindings for BoxLite - embeddable VM runtime for secure code execution"

[lib]
crate-type = ["cdylib"]

[dependencies]
# Core BoxLite dependencies
boxlite = { path = "../../src/boxlite", features = ["rest"] }
boxlite-shared.workspace = true

# napi-rs for Node.js bindings
napi = { version = "3.16.1", features = ["async", "napi8", "tokio_rt", "serde-json"] }
napi-derive = "3.7.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Async runtime
tokio = { version = "1.37", features = ["io-util", "net", "sync", "rt-multi-thread"] }
futures = "0.3"

# Logging
tracing = "0.1"

# Local directory mounts are implemented by the native backend on this target.
[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies]
boxlite = { path = "../../src/boxlite", features = ["native"] }

[dev-dependencies]
boxlite = { path = "../../src/boxlite", features = ["test-support"] }

[build-dependencies]
napi-build = "2.6.0"

[profile.release]
lto = true
strip = true  # Strip symbols for smaller binaries
codegen-units = 1
opt-level = 3

# Test-only addon with the real N-API agent classes and a deterministic backend.
[[example]]
name = "agent_record_fixture"
path = "tests/fixtures/agent_record_fixture.rs"
crate-type = ["cdylib"]