#kvm #sandbox

bux

Embedded micro-VM sandbox for running AI agents

6 releases (3 breaking)

Uses new Rust 2024

0.6.0 Feb 26, 2026
0.4.1 Feb 25, 2026
0.2.1 Feb 25, 2026
0.1.0 Feb 1, 2026

#717 in Embedded development


Used in bux-cli

MIT/Apache

265KB
5K SLoC

bux

Embedded micro-VM sandbox for running AI agents.


lib.rs:

Embedded micro-VM sandbox for running AI agents.

bux wraps libkrun into a safe Rust API for creating, running, and managing lightweight virtual machines powered by KVM (Linux) or Hypervisor.framework (macOS).

Quick start — one-shot execution

use bux::Vm;

let vm = Vm::builder()
    .vcpus(2)
    .ram_mib(512)
    .root("/path/to/rootfs")
    .exec("/bin/bash", &["--login"])
    .build()
    .expect("invalid VM config");

// Takes over the process — only returns on error.
vm.start().expect("failed to start VM");

Dependencies

~24–33MB
~612K SLoC