Introduction
Zero-Knowledge Virtual Machines (zkVMs) represent a breakthrough in verifiable computing, allowing a prover to execute a program and generate a cryptographic proof of its correct execution. However, a significant gap exists between raw zkVM hardware (often targeting RISC-V or MIPS ISAs) and modern software. Most applications depend on an Operating System (OS) and standard libraries (libc) for essential tasks like memory management and threading.
To bridge this gap, zkVM developers have historically relied on "forked toolchains"—manually patching language-specific standard libraries (like Rust or C++) to bypass system calls and interact directly with the virtual hardware. This approach creates a maintenance nightmare ("version hell"), expands the un-audited Trusted Computing Base (TCB), and fragments the ecosystem.
The ZeroOS Architecture
ZeroOS introduces a modular library operating system (libOS) that shifts the integration point from the high-level language library down to the low-level syscall trap handler. By implementing a simplified subset of the Linux ABI, ZeroOS allows developers to use unmodified, off-the-shelf toolchains.
Key Technical Components
- Syscall Shim: Instead of modifying
libc, ZeroOS intercepts standardecall(syscall) instructions. It supports high-impact primitives likemmapfor memory andfutexfor threading, covering the vast majority of requirements for popular applications. - Modular "Pay-for-what-you-use" Model: In zkVMs, every instruction increases the execution trace length and the cost of proof generation. ZeroOS allows developers to link only the specific modules they need, keeping the trace as short as possible.
- Platform-Agnostic Kernel: The core logic is decoupled from the hardware. Supporting a new zkVM only requires a small, platform-specific bootloader to initialize the virtual environment.
Key Insights and Benefits
ZeroOS provides several critical advantages over the status quo:
- Universal Language Support: By targeting the syscall layer, ZeroOS is language-agnostic. The same OS logic supports Rust, C++, Go, or any language targeting the Linux ABI.
- TCB Minimization: Using unmodified, community-audited libraries like
musllibc reduces the amount of custom code requiring specialized security audits. - Unikernel Efficiency: ZeroOS compiles the application and OS into a single, self-contained binary that runs directly on the zkVM "bare metal," optimizing performance for the unique constraints of zero-knowledge proofs.
Current Limitations and Future Work
While ZeroOS successfully demonstrates the elimination of forked toolchains, it currently focuses on single-process unikernels. While multithreading is supported via clone and futex, full multitasking (e.g., fork and exec) is not yet implemented. Future work will focus on expanding the module library to include a Virtual Filesystem (VFS) and developing deterministic, secure I/O for complex operations like networking.
By providing a shared, auditable foundation, ZeroOS aims to unify the engineering efforts across the diverse landscape of zkVM projects, moving the industry toward a more stable and secure standard for verifiable computing.
Summary updated