Cargo Features

rkyv = { version = "0.7.42", default-features = false, features = ["std", "alloc", "arbitrary_enum_discriminant", "archive_be", "archive_le", "copy", "copy_unsafe", "size_16", "size_32", "size_64", "strict", "uuid", "validation", "indexmap", "smallvec", "arrayvec"] }
default = size_32, std

These default features are set whenever rkyv is added without default-features = false somewhere in the dependency tree.

std default = alloc

Enables std of optional bytecheck =0.6.11, ptr_meta ~0.1.3, optional rend, and optional uuid

Affects rkyv::ffi

alloc std validation? = hashbrown

Enables alloc of optional tinyvec and alloc of optional bitvec


Support for various common crates. These are primarily to get users off the ground and build some momentum.

These are NOT PLANNED to remain in rkyv for the final release. Much like serde, these implementations should be moved into their respective crates over time. Before adding support for another crate, please consider getting rkyv support in the crate instead.

Affects de::SharedPointer, de::SharedDeserializeRegistry, niche::option_box, serializers::AllocSerializer, util::to_bytes, util::from_bytes_unchecked


Enables arbitrary_enum_discriminant of rkyv_derive

archive_be = rend

Enables archive_be of rkyv_derive

archive_le = rend

Enables archive_le of rkyv_derive


Enables copy of rkyv_derive

Affects rkyv::copy


Affects copy::ArchiveCopyOptimize

size_32 default

Enables strict of rkyv_derive


Enables uuid, uuid of optional bytecheck =0.6.11

validation = alloc, bytecheck

Enables validation of rend

Affects btree_map::validation, hash_index::validation, hash_map::validation, index_map::validation, util::validation, rkyv::validation

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

hashbrown alloc?

Enables default features of hashbrown ^0.12

rend archive_be? archive_le?
indexmap implicit feature

Enables indexmap ^1.7

smallvec implicit feature
arrayvec implicit feature