Python, but Java.
Boomslang runs CPython 3.14 from a WASI build. The default artifact embeds that runtime in Java through Chicory, so Python runs inside the JVM without JNI, subprocesses, or a system Python install — sandboxed, with the stdlib plus NumPy, Pandas, Matplotlib, Pillow, Pydantic, ijson, and Jinja2 included. The same runtime is also packaged as a Python wheel (boomslang-py/, executed with wasmtime) and embeddable from Rust or any WASM runtime via a language-neutral ABI.
Documentation: https://github.hubspot.com/boomslang/
<dependency>
<groupId>com.hubspot</groupId>
<artifactId>boomslang</artifactId>
<version>0.1.1</version>
</dependency>Path pythonRoot = Files.createTempDirectory("boomslang-python");
PythonExecutorFactory factory = PythonExecutorFactory
.builder()
.withStdlibPath(pythonRoot)
.addExtension(HostBridge.builder().buildExtension())
.build();
PythonResult result = factory.runOnWasmThread(() -> {
PythonInstance instance = factory.createInstance(pythonRoot);
return instance.execute("print('hello from Python')");
});
System.out.println(result.stdout());Sandboxed Python from Python — wheels are attached to GitHub releases:
from boomslang import Sandbox
with Sandbox() as sandbox:
result = sandbox.execute("print('hello from the sandbox')")
print(result.stdout)See the Quickstart for a walkthrough, the User Guide for timeouts, host functions, async, the Python host, and custom runtimes, and Installation for the slim no-python-runtime variant. The Python package is documented in boomslang-py/README.md.
The full pipeline (CPython → WASM in containers, Rust guest, Java AOT) is driven by Mill, with a just shim for common loops:
nix develop # Java 21, Maven, just, mdBook, WASI toolchain
just fetch-main-wasm # prebuilt runtime resources from GitHub Releases (skips the ~1hr container build)
just build # Maven package with AOT
just test # integration tests
just python-test # boomslang-py package tests (staged resources + venv + pytest)Building everything from source: ./mill artifacts.installAll && ./mill build. Details, the artifact DAG, container-engine selection (Docker / Apple container), and the Rust change loop are in the contributor docs.
core/— Java runtime API and bundled Python resourcesboomslang-py/— Python host package (Sandbox API, wheel bundling the WASM runtime)python-host/,python-host-core/— Rust code compiled into the WASM guestextensions/— built-in host extensionsboomslang-hostgen/— extension code generator (Rust DSL + CLI)examples/— custom Python build and Rust/Wasmtime host examplescpython/— CPython, native library, and container build pipelinetests/,benchmarks/— integration tests and JMH benchmarks
Apache 2.0