Cargo Features

[dependencies]
musli = { version = "0.0.121", default-features = false, features = ["std", "alloc", "verbose", "wire", "descriptive", "json", "parse-full", "value", "serde", "test", "simdutf8"] }
default = alloc, std

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

std default

Enables std of musli-core, optional serde, and optional simdutf8

serde:

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

Affects encoding::to_writer, encoding::to_writer, encoding::to_writer, encoding::to_writer

alloc default

Enables alloc of musli-core

Affects encoding::to_vec, encoding::to_vec, encoding::to_string, encoding::to_vec, str::from_utf8_owned, en::SomeValueWriter, en::SequenceValueEncoder, en::PackValueEncoder, en::MapValueEncoder, en::PairValueEncoder, en::VariantValueEncoder, en::VariantSequenceEncoder, en::VariantStructEncoder, encoding::to_vec, macros::support, str::from_utf8_owned

verbose

Enables verbose of musli-core

storage wire test?
descriptive test? = value
json test? = value

Enables itoa and ryu

parse-full test?
value descriptive? json? test?
serde test?

Enables serde

test = descriptive, json, parse-full, serde, storage, value, wire

Affects descriptive::test, json::test, storage::test, wire::test, macros::support

Features from optional dependencies

simdutf8 implicit feature

Enables simdutf8

simdutf8:

SIMD-accelerated UTF-8 validation

Affects str::from_utf8_owned