unkernel-rs for Python
Embeddable Linux 7.x micro-VM sandbox running inside WebAssembly (wasmtime) — zero Docker, zero KVM, zero root, zero Node.js.
Powered by unkernel-rs and pithings/unkernel.
Install
pip install unkernel-rs
On first boot, unkernel-rs downloads and SHA-256-verifies the pinned unkernel.wasm + alpine.erofs (~26 MB) into your local cache and AOT-compiles a .cwasm image for ~1s warm boots.
Quickstart
1. Disposable Air-Gapped Linux VM
import unkernel_rs
with unkernel_rs.Vm() as vm:
res = vm.exec(["uname", "-a"])
print(res.stdout_text)
print(vm.active_processes()) # Level-3 SharedMemory VMI
2. Copy-on-Write Workspace & Counterfactual Branching
import unkernel_rs
with unkernel_rs.Vm(mounts=["./repo:/work:cow"]) as vm:
vm.shell("echo base > /work/state.txt")
snap = vm.snapshot()
with snap.branch() as branch_a, snap.branch() as branch_b:
branch_a.shell("echo fix_a >> /work/state.txt")
branch_b.shell("echo fix_b >> /work/state.txt")
print(branch_a.workspace_diff("/work"))
branch_a.commit_workspace("/work") # commit winner, discard loser
3. Zero-MITM Level-3 VMI TLS Inspection & Audit Stream
import unkernel_rs
events = []
with unkernel_rs.Vm(
net=True,
allow_hosts=["example.com"],
vmi_tls=True,
on_audit=events.append,
) as vm:
res = vm.shell("wget -qO- https://example.com | head -n 1")
print(res.stdout_text)
for ev in events:
if ev["event"] == "net.tls_decrypted":
print(ev["direction"], ev.get("http_summary"), ev["proc"])
4. Freeze-on-Ask Policy Callback
import unkernel_rs
def approve(req: dict) -> str:
# Entire guest kernel + monotonic clock are frozen while this runs!
return "allow_once" if "example.com" in req["target"] else "deny_once"
with unkernel_rs.Vm(
net=True,
allow_hosts=["example.com"],
ask_net=True,
freeze_on_ask=True,
on_approval=approve,
) as vm:
res = vm.shell("wget -qO- https://example.com | head -n 1")
License
Dual-licensed under MIT OR Apache-2.0. Upstream unkernel Linux kernel images (GPL-2.0-only) are fetched at runtime and never bundled in this wheel.
Metadata
Release files for unkernel-rs 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| unkernel_rs-0.5.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for unkernel_rs-0.5.0-cp39-abi3-win_amd64.whl |
| unkernel_rs-0.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for unkernel_rs-0.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| unkernel_rs-0.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for unkernel_rs-0.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| unkernel_rs-0.5.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for unkernel_rs-0.5.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 21.9 MB
Release files / unkernel_rs-0.5.0-cp39-abi3-win_amd64.whl
| Download URL | unkernel_rs-0.5.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c2f3cfacd2bf57f97d1f9574d47f70c4fb68a73a132cf8913fb994808fa6df1f
|
|
BLAKE2b-256 checksum How to use checksums |
7c8d5177148b10ee791393c07e83beb01bc26d93b2331ada7ce1db244bbe0c64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / unkernel_rs-0.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | unkernel_rs-0.5.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3bb66d0eeb636f884b01b80e7ffbf58f3c7988ec106b48fbbd7fd09a72a2e633
|
|
BLAKE2b-256 checksum How to use checksums |
a9dc6eff00f9a8dc0fe09e7766c52fa0ab757d7f2bfed536114a0abfdc23225f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / unkernel_rs-0.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | unkernel_rs-0.5.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d59f724f11057ab3a4bd74427e86a1a3ea09b64eede318e266003d64210a9871
|
|
BLAKE2b-256 checksum How to use checksums |
587de6ae2df1b8bbae647f2ebd5433ebe94df1ef37af3ab126dd09135ba53414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / unkernel_rs-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | unkernel_rs-0.5.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c872140e3448ba68a0d27765e4c3838e808d9a14a9e9baeab2dac9e99703bbbf
|
|
BLAKE2b-256 checksum How to use checksums |
ff78968fe47bdf65f78e5ef21817b8c3425f7e2f20dd19b6efadc4a251a738d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for unkernel-rs 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for unkernel_rs-0.5.0-cp39-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.