A Rust library for serializing and accessing archived data without full deserialization copies.
Overview
rkyv (pronounced archive) is a zero-copy deserialization framework for Rust. It lets programs read structured data directly from a byte buffer after validation, which suits workloads where parsing cost dominates.
The project documents motivation, architecture, and major features in a dedicated book, with API reference and examples in the source tree. A safe API path relies on the bytecheck feature for validation, enabled by default.
Related crates extend the core: rkyvdyn adds trait object support; rend, bytecheck, rancor, and ptrmeta cover endian handling, validation, errors, and pointer metadata respectively. Benchmark material compares rkyv with other Rust serialization approaches, including zero-copy-specific cases.
Developers choose rkyv when they need archived layouts that can be inspected in place rather than fully materialized Rust types on every load.
Key features
- Zero-copy archived access
- Optional bytecheck validation
- Trait object support via rkyvdyn
- Documented book and examples
- Serialization benchmark comparisons
- Companion crates for errors and endian
Use cases
- Fast on-disk caches
- Large struct reload without alloc
- Game or engine save formats
- Zero-copy deserialization from bytes