Expand description
Safe, ergonomic API for libkrun micro-VM sandboxing.
bux wraps the raw FFI bindings from bux_sys into a type-safe,
Rust-idiomatic interface for creating and running lightweight virtual
machines powered by KVM (Linux) or Hypervisor.framework (macOS).
§Quick start
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");Structs§
Enums§
- Disk
Format - Disk image format for [
add_disk2] and [add_disk3]. - Error
- Errors returned by bux VM operations.
- Feature
- Build-time feature flag for [
has_feature]. - Kernel
Format - Kernel image format for [
set_kernel]. - LogLevel
- Log verbosity level for libkrun.
- LogStyle
- Log output style (terminal escape sequences).
- Sync
Mode - Block device sync mode for [
add_disk3].
Type Aliases§
- Result
- Alias for
Result<T, bux::Error>.