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-python"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
publish = false
description = "Python bindings for Boxlite"

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

[features]
# `extension-module` tells pyo3 not to link libpython, which is right for the
# wheel maturin builds but makes `cargo test` unlinkable. Gating it lets the
# binding's own unit tests run with --no-default-features while every normal
# build keeps the wheel behaviour.
default = ["extension-module"]
extension-module = ["pyo3/extension-module"]

[dependencies]
boxlite = { path = "../../src/boxlite", features = ["rest"] }
pyo3 = { version = "0.27.1" }
pyo3-async-runtimes = { version = "0.27", features = ["tokio-runtime"] }
tokio = { version = "1.37", features = ["io-util", "net", "sync"] }
futures = "0.3.31"
tracing = "0.1.44"
serde_json = "1.0"

# 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"] }
# `cargo test --no-default-features` links libpython but does not start an
# interpreter; auto-initialize does that on first use so the binding's own
# tests can build Python objects.
pyo3 = { version = "0.27.1", features = ["auto-initialize"] }