Cargo Features

[dependencies]
musli = { version = "0.0.122", 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.

alloc default

Enables alloc of musli-core and optional serde

serde:

Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.

Affects encoding::to_string, str::from_utf8_owned, en::SomeValueWriter, en::SequenceValueEncoder, en::PackValueEncoder, en::MapValueEncoder, en::PairValueEncoder, en::VariantValueEncoder, en::VariantSequenceEncoder, en::VariantStructEncoder, 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

Features from optional dependencies

simdutf8 implicit feature

Enables simdutf8

simdutf8:

SIMD-accelerated UTF-8 validation

Affects str::from_utf8_owned