Cargo Features

minicbor has no features set by default.

minicbor = { version = "0.20.0", features = ["std", "alloc", "derive", "half"] }
std = alloc

Enables std of optional minicbor-derive

Affects write::Writer

Required by the cbor-display binary

alloc std?

Enables alloc of optional minicbor-derive

Affects bytes::ByteVec, minicbor::to_vec, minicbor::to_vec_with, minicbor::display

derive = minicbor-derive

Affects bytes::EncodeBytes, bytes::DecodeBytes, bytes::CborLenBytes, bytes::decode, bytes::nil, bytes::encode, bytes::is_nil, bytes::cbor_len

Features from optional dependencies

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

half implicit feature

Enables half ^1

Affects minicbor::display

Required by the cbor-display binary