Cargo Features

[dependencies]
packed_struct = { version = "0.10.1", default-features = false, features = ["std", "alloc", "byte_types_256", "use_serde"] }
default = std

The std feature is set by default whenever packed_struct is added without default-features = false somewhere in the dependency tree.

std default

Enables std of packed_struct_codegen and serde

serde:

Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.

Affects internal_prelude::v1, debug_fmt::PackedStructDebug, packed_struct::debug_fmt, packing::PackedStructSlice.pack_to_vec, primitive_enum::PrimitiveEnumDynamicStr

alloc

Enables alloc of packed_struct_codegen

Affects debug_fmt::PackedStructDebug, packed_struct::debug_fmt, packing::PackedStructSlice.pack_to_vec, primitive_enum::PrimitiveEnumDynamicStr

byte_types_64 byte_types_256
use_serde = serde, serde_derive

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

serde std use_serde?
serde_derive use_serde?