MCPcopy Create free account
hub / github.com/asterinas/vostd

github.com/asterinas/vostd @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
8,968 symbols 28,685 edges 1,228 files ⚖ Apache-2.0 2,733 documented · 30% updated 7d ago★ 5218 open issues

Browse by type

Functions 7,307 Types & classes 1,661
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Formal Verification of Asterinas OSTD with Verus

docs verify verify (verus-lang/verus)

Overview

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.

Publications

This project is tied to the following papers:

  • 🏆 CortenMMCortenMM: Efficient Memory Management with Strong Correctness Guarantees, SOSP 2025 (Best Paper Award). Concurrency proofs for OSTD memory management. [paper] [code]
  • KVerusKVerus: Scalable and Resilient Formal Verification Proof Generation for Rust Code, ASE 2026 (Industry Track). Retrieval-augmented, self-adaptive proof synthesis and repair for Verus. KVerus-generated proofs accepted upstream are tracked under the AI-assist label. [paper]
  • StarVerus - StarVerus: LLM-Powered Multi-Agent Collaboration for Industrial Rust Code Verification Automation, KDD 2026 (ADS Track). Multi-agent verification for industrial Rust. [paper]
  • Beyond BenchmarksBeyond Benchmarks: A Case Study of LLM-Generated Verus Specification Failures on Asterinas Vostd, ASE 2026 (Industry Track). coming soon

Bugs Found by Verification

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.

Project Structure

vostd/
├── dv/               # Build system
├── ostd/
│   ├── specs/        # Verus specifications
│   └── src/          # OSTD implementation and proofs
└── verified_libs/    # Auxiliary verified libraries
    ├── bitflags/
    ├── ostd-pod/
    └── vstd_extra/

Building

Prerequisites

bash git submodule update --init --recursive

Build Verus

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_PATH at the directory containing the cargo-verus binary (or add it to your PATH) and run cargo verus verify.

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.

Clean

make clean      # or: cargo dv clean          # remove build artifacts for a fresh build

Build & Docs

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.

IDE Support

Contributing

We welcome your contributions! Conventions:

  • Prefix axiom fn with axiom_, proof fn with lemma_, and proof helpers that manipulate tracked linear permission objects with tracked_.
  • Prefer associated functions over isolated lemmas.
  • Put specifications and lemmas in ostd/specs; general definitions and lemmas in verified_libs/vstd_extra.
  • Before submitting: run make verus-upgrade (cargo dv bootstrap --upgrade) to follow the latest supported Verus, and make fmt (cargo dv fmt) to format (enforced).
  • For Verus changes, prefer PRs to the upstream repo over our fork, since we aim to minimize differences between them.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 5,427
Function 1,880
Class 1,238
Enum 268
Interface 155

Languages

Rust97%
C3%
C++1%

Modules by API surface

kernel/src/fs/ext2/inode.rs105 symbols
kernel/src/fs/ramfs/fs.rs88 symbols
kernel/src/fs/overlayfs/fs.rs82 symbols
kernel/src/fs/utils/inode.rs79 symbols
kernel/src/fs/exfat/inode.rs78 symbols
kernel/comps/mlsdisk/src/layers/3-log/tx_log.rs73 symbols
kernel/comps/mlsdisk/src/layers/1-crypto/crypto_log.rs66 symbols
kernel/src/fs/utils/systree_inode.rs60 symbols
kernel/comps/mlsdisk/src/layers/2-edit/journal.rs59 symbols
kernel/comps/mlsdisk/src/layers/4-lsm/tx_lsm_tree.rs58 symbols
kernel/src/vm/vmar/mod.rs57 symbols
kernel/src/process/process/mod.rs55 symbols

For agents

$ claude mcp add vostd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page