minicbor-derive
Derive minicbor `Decode` and `Encode` traits.
0.19.5
10M downloads/mo
#3122 most downloaded on crates.io
twittner/minicbor
What this package is like to depend on
Last release 1 months ago
20 Jul 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 42 of 42 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
43 releases · first in 2020
7 releases in the last 12 months
see the full history below
Release timeline
43 releases · Mar 2020 to Jul 2026Releases
latest 43-
0.19.520 Jul 2026Release notes
Open source →- Adds
#[cbor(crate = "<path>")]to allow re-exporters of the derive macros to point the generated code at a different path for theminicborcrate. See pull request [62][pr62] by @sdbondi for details.
- Adds
-
0.19.417 May 2026Release notes
Open source →- Fixes
CborLenrelated bugs, see commit 7d0b368cc92ca3be0acae5364461f5cae9df7cdd for details.
- Fixes
-
0.19.324 Feb 2026 -
0.19.204 Feb 2026 -
0.19.104 Feb 2026Release notes
Open source →- Bugfix release (see merge request [26][mr26] by @jeandudey for details).
-
0.19.001 Feb 2026Release notes
Open source →- Added the trait
CborLenand functionsminicbor::lenandminicbor::len_withto allow client code to calculate the length in bytes of a value's CBOR representation. See issue [32][i32] and merge request [23][mr23] for details.
- Added the trait
-
0.18.324 Nov 2025Release notes
Open source →- Fixes feature-handling, see pull request [48][pr48] by @dtolnay for details.
-
0.18.223 Aug 2025Release notes
Open source →- Using
#[cbor(transparent)]together with a custom codec (e.g.#[cbor(with = "...")]) will only overrideEncode::is_nilandDecode::nilif thehas_nilattribute or its equivalent is present.
- Using
-
0.18.116 Aug 2025Release notes
Open source →- Maintenance release, fixing an issue with blacklisting type parameter constraints, see commit 0f7cc0d8468b7cfbc8fb12833db6d6b47d54713d for details.
-
0.18.023 Jul 2025Release notes
Open source →- Remove feature
partial-derive-support.EncodeandDecodecan always be derived. See commits 21060b3272d4d09af88aa8543f682c8c4477a886 and 9038d3cced197588ae4d8d2c891d6f51029a9e7d for details. - Rework
encode::Writeimpls. The blanket impl for types implementingstd::io::Writehas been removed. The impl forVec<u8>now always usesInfallibleas its error type andminicbor::{to_vec, to_vec_with}no longer require feature "std". See commit 498043ddce69e3da0dcc66593afdeea0dd058fb8 for details. - Depend on
minicbor-derive-0.12.0.
- Remove feature
-
0.17.018 May 2025Release notes
Open source →- Remove cargo feature
partial-skip-support. The methodDecoder::skipis now always available. With cargo featurealloc, every CBOR item can be skipped over, otherwise attempting to skip over indefinite-length arrays or maps inside of regular arrays or maps will result in an error. - Depend on
minicbor-derive-0.11.0.
- Remove cargo feature
-
0.16.220 Mar 2025 -
0.16.116 Mar 2025Release notes
Open source →- Specialise
Cow<_, [u8]>by adding implementations ofminicbor::bytes::{EncodeBytes, DecodeBytes}.
- Specialise
-
0.16.018 Feb 2025 -
0.15.312 Sep 2024 -
0.15.210 Sep 2024 -
0.15.104 Sep 2024 -
0.15.017 Apr 2024Release notes
Open source →-
⚠️ Breaking ⚠️: The encoding of IP addresses changed (see commit fac39d5a). This affects the following types:
- std::net::IpAddr
- std::net::Ipv4Addr
- std::net::Ipv6Addr
- std::net::SocketAddr
- std::net::SocketAddrV4
- std::net::SocketAddrV6
A new module
minicbor::legacyis introduced which contains newtype wrappers for these types which continue to use the array-based encoding. Users can opt out of the new compact format by enabling the cargo feature"legacy"and importing the types from the legacy module. -
A new type
minicbor::data::Inthas been introduced (see merge request [20][mr20]) to allow encoding and decoding of the whole CBOR integer range [-2<sup>64</sup>, 2<sup>64</sup> - 1]. -
⚠️ Breaking ⚠️: As a consequence of adding the new
Inttype, a new constructorminicbor::data::Type::Inthas been added to denote those (signed) integers that do not fit into ani64. Similarly the new constructorminicbor::decode::Token::Intcaptures those values.
-
-
0.14.009 Apr 2024Release notes
Open source →- ⚠️ Breaking ⚠️:
encode::Erroranddecode::Errorare now structs instead of enums. The actual error representation is hidden and errors are constructed with functions instead of creating enum values directly, for exampleError::Message("foo")is nowError::message("foo"). This was done to support adding more information to error values, like the decoding position. For details see merge request [19][mr19].
- ⚠️ Breaking ⚠️:
-
0.13.017 Dec 2022Release notes
Open source →- ⚠️ Breaking ⚠️: Removed the
Cloneimpl ofdecode::Error. - Added a new variant
decode::Error::Custom(requires featurestd) which contains an arbitraryBox<dyn std::error::Error + Send + Sync>.
- ⚠️ Breaking ⚠️: Removed the
-
0.12.019 Jun 2022Release notes
Open source →- Extend the optionality of fields beyond
Option. This applies to derived impls ofEncodeandDecodewhich make use of newly added methodsEncode::is_nilandDecode::nilinstead ofOption::is_noneandNone. See issue [10][i10] and merge request [15][mr15] for details.
- Extend the optionality of fields beyond
-
0.11.001 Jun 2022 -
0.10.127 May 2022 -
0.10.008 May 2022Release notes
Open source →- ⚠️ Breaking ⚠️: By default
Decoder::skipis not available anymore. It can be enabled with feature flag"alloc"(implied by"std") or"partial-skip-support". The latter variant corresponds to the implementation of minicbor <= 0.9.1 but does not support skipping over indefinite-length arrays or maps inside of regular arrays or maps. The variant enabled by"alloc"supports skipping over arbitrary CBOR items. For more information see [feature flags][3] and issue [9][i9].
- ⚠️ Breaking ⚠️: By default
-
0.10.0-rc.101 May 2022 pre-releaseRelease notes
Open source →- Depends on
minicbor-0.16.0-rc.1. - A new attribute
context_boundhas been added to allow constraining the generic context type of the derivedEncodeorDecodetrait impl with a set of trait bounds.
- Depends on
-
0.9.020 Feb 2022Release notes
Open source →- ⚠️ Breaking ⚠️: The encoding of
()andPhantomDatahas changed. See commit b6b1f907. - ⚠️ Breaking ⚠️: The
decode::Error::TypeMismatchconstructor changed to use adata::Typeinstead of au8as its first parameter. See merge request [6][mr6] for details. - Added feature flag
alloc(implied bystd), which enables most collections types in ano_stdenvironment. See merge request [9][mr9] for details. - Added
ByteArrayto support compact encoding ofu8-arrays, similarly to the already existingByteSliceandByteVectypes added inminicbor-0.6.0. See merge request [10][mr10] for details. - Added
Writeimpl foralloc::vec::Vec(see merge request [11][mr11] by @Hawk777). - Depends on
minicbor-derive-0.6.4.
- ⚠️ Breaking ⚠️: The encoding of
-
0.8.029 Nov 2021Release notes
Open source →- ⚠️ Breaking ⚠️: Change
data::Typeto distinguish between indefinite arrays, maps, bytes and strings, and regular ones by introducing constructors such asType::ArrayIndef. - Add new types
decode::Tokenanddecode::Tokenizerto allow decoding CBOR bytes generically as a mere sequence of tokens. - Add a function
displaywhich displays CBOR bytes in [diagnostic notation][2].
- ⚠️ Breaking ⚠️: Change
-
0.7.221 Nov 2021Release notes
Open source →- Bugfix:
Type::readused0xc9instead of0xc0when readingType::Tag. - Add README.md
- Bugfix:
-
0.7.123 Aug 2021 -
0.7.022 Aug 2021 -
0.6.421 Jul 2021 -
0.6.312 Apr 2021 -
0.6.228 Feb 2021 -
0.6.116 Jan 2021 -
0.6.031 Oct 2020Release notes
Open source →- Removes the
&[u8]impl forDecode(see issue [4][i4]) and add a new moduleminicbor::bytesto support specialised encoding of CBOR bytes. This module provides the typesByteSliceandByteVecwhich are substitutes for&[u8]andVec<u8>respectively. See also the module documentation ofminicbor::bytes.
- Removes the
-
0.5.023 Sep 2020 -
0.4.106 Sep 2020Release notes
Open source →- Adds
Encoder::f16to support encoding off32values as half floats. Complements the existingDecoder::f16method and depends on the featurehalf.
- Adds
-
0.4.023 Aug 2020Release notes
Open source →- Added
EncodeandDecodeimpls for tuples (see merge request [1][mr1] by @koushiro).
minicbor-derive
- Added
-
0.3.012 May 2020Release notes
Open source →- Added
#[cbor(map)]and#[cbor(array)]attributes (see commit 40e8b240 for details).
minicbor-io
- Added
-
0.2.120 Apr 2020Release notes
Open source →ReaderandAsyncReaderalways returnUnexpectedEofwhen reading 0 bytes while decoding a frame, unless at the very beginning of a frame, when not even the length prefix has been read, whereOk(None)would be returned instead. Previous versions returnedOk(None)while reading a partial length prefix.
-
0.2.019 Apr 2020 -
0.1.129 Mar 2020 -
0.1.008 Mar 2020