containers/libkrun is an open-source project on GitHub with 2.8k stars, written primarily in Rust. A dynamic library providing Virtualization-based process isolation capabilities
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
libkrun is a dynamic library that allows programs to easily acquire the ability to run processes in a partially isolated environment using KVM Virtualization on Linux, HVF on macOS/ARM64, and WHP on Windows (upcoming).
It integrates a VMM (Virtual Machine Monitor, the userspace side of an Hypervisor) with the minimum amount of emulated devices required to its purpose, abstracting most of the complexity that comes from Virtual Machine management, offering users either a Rust or C API.
[!NOTE]
The main branch is now libkrun 2.0, which will not be backwards
compatible with the 1.x API/ABI. The 2.0 API is also still under active
development and may change further before the first stable release. If
you are building from source for production use, please use the newest
stable-* release branch
instead.
[!CAUTION]
The VM boundary does not restrict host resources exposed through devices. Limit the VMM's host permissions and exposed paths. Read the Security Model before embedding or deploying libkrun.
Use cases
crun: Adding virtualization-based isolation to container and confidential workloads (used by Podman via --runtime=krun or OCI annotations).
krunkit: Running GPU-enabled (via venus) lightweight VMs on macOS.
muvm: Launching a microVM with GPU acceleration (via native context) for running games that require 4k pages.
For details on common workload models and boot strategies, see Common Workload Models & Use Cases.
Variants
This project provides the following variants of the library:
libkrun: Generic variant compatible with all Virtualization-capable systems.
libkrun-sev: Variant including support for AMD SEV (SEV, SEV-ES and SEV-SNP) memory encryption and remote attestation. Requires an SEV-capable CPU.
libkrun-tdx: Variant including support for Intel TDX memory encryption. Requires a TDX-capable CPU.
Each variant generates a dynamic library with a different name (and soname), so both can be installed at the same time in the same system.
Supported Virtio devices
virtio-console
virtio-block
virtio-fs
virtio-gpu (venus and native-context)
virtio-net
virtio-vsock (for TSI and socket redirection)
virtio-balloon (only free-page reporting)
virtio-rng
other virtio devices via vhost-user support
Networking
In libkrun, guest networking can use two approaches:
Transparent Socket Impersonation (TSI): Hooks guest socket syscalls over virtio-vsock to share host network connectivity without a virtual network interface.
[!CAUTION]
TSI uses the VMM's host network access. Restrict the VMM's network permissions; see Security Model.
Virtual Network Interface (virtio-net): Connects a virtual Ethernet interface inside the guest to a userspace network proxy like passt or gvproxy.
For full configuration details, port forwarding, and security models, see Networking.
Linux Quickstart
Build and install libkrun, then run a shell inside an isolated microVM using the chroot_vm example:
1. Build and install libkrun
# Build with common features, then install to a user-owned prefix
make -j11 BLK=1 NET=1 VHOST_USER=1
make -j11 BLK=1 NET=1 VHOST_USER=1 PREFIX="$HOME/.local" install
For complete prerequisites, platform instructions (macOS / SEV / TDX), and feature flags, see Building and Installing libkrun.
2. Build the example and prepare a rootfs
cd examples
gcc -O2 -g -I"$HOME/.local/include" -L"$HOME/.local/lib64" \
-o chroot_vm chroot_vm.c -lkrun -lkrun_init
make rootfs # extracts a Fedora root filesystem (requires podman)
The -I and -L flags use headers and libraries installed in $HOME/.local, without a system-wide libkrun installation. Running the VM also requires libkrunfw to be installed and discoverable by the dynamic linker.
Networking Architecture: Transparent Socket Impersonation (TSI), virtio-net, and proxy integration.
Security Model: Isolation strategy, mount boundaries, and device security considerations.
Bindings Generation (ffier): ffier schema derivation and C/Rust bindings regeneration.
Contributing
See CONTRIBUTING.md for guidelines on submitting changes.
Getting in contact
If you think you've identified a security issue in the project, please DO NOT report the issue publicly via the GitHub issue tracker or Matrix. Instead, send an email with as many details as possible to [email protected]. This is a private mailing list for the core maintainers.
The main communication channel is the libkrun Matrix channel.
Acknowledgments
libkrun incorporates code from Firecracker, rust-vmm and Cloud-Hypervisor.
No homepage URL was recorded for containers/libkrun in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How many stars does containers/libkrun have?
containers/libkrun has 2.8k GitHub stars — refresh the page for the live number, or check github.com/containers/libkrun. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is containers/libkrun open source?
Yes — containers/libkrun ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/containers/libkrun.
What is containers/libkrun?
containers/libkrun (containers/libkrun) is a Rust project on GitHub. From the project's own README: A dynamic library providing Virtualization-based process isolation capabilities
Where do I read more about containers/libkrun?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/containers/libkrun is the definitive source.
Read full README in the tab above.
Curious whether libkrun is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about libkrun.