Browse by type
The vostd project provides a formally-verified version of OSTD, the (unofficial) standard library for OS development in safe Rust. OSTD encapsulates low-level hardware interactions—which require unsafe Rust—into a small set of high-level, safe abstractions, enabling complex, general-purpose OSes like Asterinas to be written entirely in safe Rust. By design, OSTD guarantees soundness: no undefined behavior is possible regardless of how its API is used. The goal of vostd is to bolster this soundness through formal verification with Verus.
This work is ongoing. Our current focus is OSTD's memory management and synchronization subsystems—core components directly tied to kernel memory safety—and we aim to extend verification to further parts of OSTD over time.
This project is tied to the following papers:
AI-assist label. [paper]Formal verification has surfaced real bugs in OSTD and the upstream Asterinas kernel, including undefined behavior, deadlocks, arithmetic overflows, and reachable panics. We track them in issue #645.
vostd/
├── dv/ # Build system
├── ostd/
│ ├── specs/ # Verus specifications
│ └── src/ # OSTD implementation and proofs
└── verified_libs/ # Auxiliary verified libraries
├── bitflags/
├── ostd-pod/
└── vstd_extra/
bash
git submodule update --init --recursive
make verus # or: cargo dv bootstrap
Verus is cloned and built under tools/verus. If the download fails, clone it manually into tools/verus and re-run cargo dv bootstrap.
[!NOTE] We use our own fork of Verus, kept in sync with upstream. To build against upstream Verus instead, use
cargo dv bootstrap --upstream-verus(our CI tracks upstream; breaking changes are usually resolved within about a week).[!TIP] If Verus is already installed elsewhere and you only want to reproduce a verification result (not the recommended way to set up the project), point
CARGO_VERUS_PATHat the directory containing thecargo-verusbinary (or add it to yourPATH) and runcargo verus verify.
make # verify everything (or: cargo dv verify)
cargo dv focus --targets ostd # ostd only, skip dependency proofs
cargo dv focus --targets ostd -- --verify-only-module sync::rwlock # verify one ostd module
cargo dv verify --targets vstd_extra # the verified dependency crate
Partial verification selectors such as --verify-only-module require the
focus command.
make clean # or: cargo dv clean # remove build artifacts for a fresh build
make build # or: cargo dv build # build the verification targets
make doc # or: cargo dv doc --target ostd # generate API docs at doc/index.html
The generated documentation can be found at doc/.
An online version is also available.
verus-analyzerverus-modeWe welcome your contributions! Conventions:
axiom fn with axiom_, proof fn with lemma_, and proof helpers that manipulate tracked linear permission objects with tracked_.ostd/specs; general definitions and lemmas in verified_libs/vstd_extra.make verus-upgrade (cargo dv bootstrap --upgrade) to follow the latest supported Verus, and make fmt (cargo dv fmt) to format (enforced).browse all types & interfaces →
$ claude mcp add vostd \
-- python -m otcore.mcp_server <graph>