Cargo Features
[dependencies]
postcard = { version = "1.1.1", default-features = false, features = ["embedded-io", "embedded-io-04", "use-std", "alloc", "embedded-io-06", "heapless-cas", "use-defmt", "use-crc", "experimental-derive", "crc", "defmt", "heapless", "paste", "postcard-derive"] }
- default = heapless-cas
-
The
heapless-cas
feature is set by default wheneverpostcard
is added without
somewhere in the dependency tree.default-features = false - embedded-io
-
Enables support for
embedded-io
traits This feature will track the latestembedded-io
when major releases are madeEnables embedded-io ^0.4
- embedded-io-04
-
Specific versions of
embedded-io
can be selected through the features belowEnables embedded-io ^0.4
Affects
flavors::io.eio
,de::from_eio
,flavors::eio
,ser::to_eio
,flavors::io
… - use-std = alloc
-
serde:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.Affects
flavors::io.io
,de::from_io
,flavors::io
,ser::to_stdvec
,ser::to_stdvec_cobs
,ser::to_io
,ser::to_stdvec_crc32
,flavors::io
… - alloc use-std?
-
Enables alloc of optional embedded-io ^0.4, optional embedded-io, and 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
ser::to_allocvec
,ser::to_allocvec_cobs
,ser::to_allocvec_crc32
… - embedded-io-06
-
Enables embedded-io
Affects
flavors::io.eio
,de::from_eio
,flavors::eio
,ser::to_eio
,flavors::io
… - heapless-cas default = heapless
-
Enables cas of heapless ^0.7.0
- use-defmt = defmt
- use-crc = crc, paste
-
Affects
flavors::crc
,de::from_bytes_crc32
,de::take_from_bytes_crc32
,flavors::crc
,ser::to_slice_crc32
,ser::to_vec_crc32
,ser::to_stdvec_crc32
,ser::to_allocvec_crc32
… - experimental-derive = postcard-derive
-
Experimental features!
NOT subject to SemVer guarantees!Affects
postcard::experimental.max_size
… - crc use-crc?
-
Enables crc
- defmt use-defmt?
-
Enables defmt
- heapless heapless-cas
-
Enables heapless ^0.7.0
Affects
ser::to_vec_cobs
,ser::to_vec
,ser::to_vec_crc32
… - paste use-crc?
-
Enables paste
- postcard-derive experimental-derive?
-
Enables postcard-derive ^0.1.2