Vest is a framework based on Verus for building verified, secure, and performant parsers and serializers for binary data formats in Rust. A binary data format specifies constraints and inter-dependencies on structured data, as well as how that data is represented in bytes; a parser/serializer implements that specification by mechanically translating between the structured data and its flat byte representation. Binary formats are ubiquitous in networking, data storage, and cryptography, and are often both performance-critical and security-critical.
Vest consists of several core components:
vest_lib, a verified combinator library in Rust for building formats (parsers, serializers, and their data types) compositionally.vestDSL, a domain-specific language for describing formats concisely; and a compiler that automatically generates verified Rust code (leveraging the combinator libraryvest_lib) from format descriptions in the DSL.vest_asn1, a compiler for ASN.1 schemas that automatically generates verified parsers and serializers (leveraging the verified backend ASN.1 combinators invest_lib), supporting both Distinguished Encoding Rules (DER) and Basic Encoding Rules (BER).- Vest-CBOR, a verified generic CBOR codec (built on top of
vest_libcombinators) that supports both general and deterministic CBOR.
Vest-generated parsers and serializers are provably memory-safe, arithmetically safe, panic-free, and terminating on any input. More importantly, they are guaranteed to satisfy a suite of security properties, making them immune to entire classes of attacks that have historically plagued unverified, hand-written code.
Vest is a research tool under active development. The DSL and ASN.1 frontend are not by themselves verified and could contain bugs. Some language and format features are still unsupported, and APIs may change. The language reference and ASN.1 support table document current limitations. Each Vest release pins its compatible Verus release.
Vest 2.0 is a substantial redesign. Existing users should read the migration guide before upgrading.
- The Vest guide covers installation, the DSL, generated Rust APIs, formal guarantees, and the ASN.1 frontend.
- The
vest_libdocumentation describes the nitty-gritty (spec, proof, and exec) of Vest's trait system, format combinators, the reasoning principles, etc.
- Vest DSL examples include TLS, Bitcoin, WireGuard, and smaller ones covering bit fields, dependent choices and TLV, and nested structures.
- The ASN.1 frontend includes a curated CMS schema and its generated, formally verified codec, alongside smaller DER, BER, and mixed-rule schemas.
vest_dev/src/formatscontains example formats written directly withvest_libcombinators, including mapped formats, dependent formats, and recursive formats.
Please report vest_lib issues and DSL/ASN.1 compiler bugs through GitHub Issues. For questions, help, or design discussions, join the Verus Zulip and mention Vest in the topic or message.
Vest was introduced in “Vest: Verified, Secure, High-Performance Parsing and Serialization for Rust” at the 2025 USENIX Security Symposium.
@inproceedings {vest,
author = {Yi Cai and Pratap Singh and Zhengyao Lin and Jay Bosamiya and Joshua Gancher and Milijana Surbatovich and Bryan Parno},
title = {{Vest}: Verified, Secure, {High-Performance} Parsing and Serialization for Rust},
booktitle = {34th USENIX Security Symposium (USENIX Security 25)},
year = {2025},
isbn = {978-1-939133-52-6},
address = {Seattle, WA},
pages = {6917--6935},
url = {https://www.usenix.org/conference/usenixsecurity25/presentation/cai-yi},
publisher = {USENIX Association},
month = aug
}Vest is available under the MIT License.
