Interactive data flow — microVM library architecture
libkrun is a lightweight microVM library that uses KVM (Linux) or HVF (macOS) to run isolated workloads. Applications interact through a simple C API; internally, the library creates guest memory, initialises vCPUs, wires up virtio devices, and drives execution via an event loop.
C-exported functions: krun_create_ctx · krun_set_vm_config · krun_start_enter
build_microvm() — memory allocation, device registration, vCPU init
Hypervisor execution loop, MMIO exit handling, interrupt injection
GuestMemoryMmap, SHM regions, firmware/kernel placement
MMIO bus, MmioTransport, virtqueue mechanics — block, net, gpu, console
Guest↔host socket bridge with transparent socket impersonation