PackageTrack
Sign in Get early access

bson

Encoding and decoding support for BSON in Rust

3.1.0 23M downloads/mo #1933 most downloaded on crates.io mongodb/bson-rust

What this package is like to depend on

Last release 9 months ago

20 Nov 2025

Ships fairly regularly

a new release about every 3 months

Rarely documented

notes for 10 of 62 stable releases

2 versions withdrawn

withdrawn after publishing

11 years old

72 releases · first in 2015

1 release in the last 12 months

see the full history below

Release timeline

72 releases · Jun 2015 to Nov 2025
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 72
  1. 3.1.0 20 Nov 2025
    Release notes

    The MongoDB Rust driver team is pleased to announce the v3.1.0 release of the bson crate.

    Full Release Notes

    See this GitHub query for a full list of changes.

    New Features

    • Add const array bson conversion (#601)
    Open source →
  2. 3.0.0 25 Aug 2025
    Release notes

    The MongoDB Rust driver team is pleased to announce the v3.0.0 release of the bson crate.

    Highlighted Changes

    3.0 updates several APIs in backwards-incompatible ways; in most cases these changes should require only minor updates in application code.

    Most notably:

    • Unified Error Hierarchy: 3.0 adds the bson::error::Error type, with fields for values common across errors like message or associated key and a kind enum that provides granular root cause information.
    • &CStr: The bson crate now provides types that directly model the BSON spec "cstring" type, removing a potential source of panic!s and allowing validation at either run-time or compile-time for constant strings.
    • Optional serde: Integration with serde is now an optional feature; in support of this, the API has been updated to clarify where methods are for encoding (directly converting Rust BSON values into BSON bytes) or for serialization (converting arbitrary Rust structs to BSON values or bytes via the serde crate).

    For detailed information on breaking changes and code examples, please see the migration guide.

    Release Notes

    Impactful changes are listed below; for a full list of changes see this GitHub query.

    Breaking Changes

    • RUST-1906 Remove human readable options (#531)
    • RUST-1380 Drop support for uuid 0.8 (#534)
    • RUST-2169 Clean up and future-proof features (#544)
    • RUST-1887 Convince append to be more accepting (#541)
    • RUST-1960 Make large-dates time feature optional (#546)
    • RUST-1406 Add crate-wide error types, convert value access errors (#551)
    • RUST-1406 Convert raw errors to standard error type (#552)
    • RUST-1998 Remove lossy utf8 as a decoder option (#550)
    • RUST-1869 Rename RawElement::len to RawElement::size (#557)
    • RUST-1992 Make serde an optional feature (#554)
    • RUST-1406 Add type-specific errors to standard error type (#555)
    • RUST-1406 Convert serde errors to standard error type (#562)
    • RUST-1887 Make BindRawBsonRef a little more user-friendly (#565)
    • RUST-1748 Convert serde helpers to serde_with::(De)SerializeAs implementations for some converters between ObjectId, String, and DateTime (#559)
    • RUST-1992 Introduce the &CStr and CString types for keys and regular expressions (#563)
    • RUST-2241 Convert panic from malformed input to error (#568)
    • RUST-2240 Move serde_json API behind a feature flag (#567)
    • RUST-1748 Convert unsigned serde helpers to use serde_conv (#575)
    • RUST-1748 Convert UUID serde helpers to use serde_conv (#579)
    • RUST-2228 Normalize conversions between raw types and base crate types (#580)
    • RUST-1998 Remove now-redundant to_document_utf8_lossy method (#592)

    New Features

    Improvements

    Open source →
  3. 2.15.0 20 May 2025
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.15.0 release of the bson crate.

    Full Release Notes

    This release adds a contributed uncapped_max_size feature; when enabled, this increases the maximum size of a document from 16 MB to 2 GB.

    New Features

    • add uncapped_max_size feature to allow increasing max BSON size (#528) (thanks @Trevader24135!)
    Open source →
  4. 2.14.0 13 Mar 2025
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.14.0 release of the bson crate.

    Highlighted Changes

    This release adds:

    • the bson::binary::Vector type, providing efficient support for including
      densely packed arrays of numeric values in BSON documents,
    • functions to DateTime to add milliseconds and Duration,
    • Index impls for Bson and Document, allowing convenient shorthand element lookup.

    This release also updates the MSRV to 1.81.

    Full Release Notes

    New Features

    • RUST-622 Add document square bracket indexing (#503)
    • Add functions to DateTime to add milliseconds and Duration (#506) (thanks @tyilo!)
    • RUST-2003 Binary vector subtype support (#513)

    Improvements

    Bugfixes

    Open source →
  5. 2.13.0 19 Sep 2024
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.13.0 release of the bson crate.

    Highlighted Changes

    This release introduces a utility type for deserializing from UTF-8 lossy BSON bytes.

    Full Release Notes

    New Features

    • RUST-2023 Add wrapper type for utf-8 lossy deserialization (#497)
    Open source →
  6. 2.12.0 11 Sep 2024
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.12.0 release of the bson crate.

    Highlighted Changes

    This release was largely driven by external contributions!

    • An optional implementation of Hash and Eq for the Bson family of types
    • ObjectId::from_parts, allowing direct construction of an ObjectId from its component values
    • Helpers for serializing Option<chrono::DateTime<_>> as Option<bson::DateTime>
    • A fix for a panic when parsing specific malformed input data into a Decimal128

    We've also added optional (off by default) integration with the serde_path_to_error crate, which
    provides paths to the precise point of failure for deserialization of nested data structures.

    Full Release Notes

    New Features

    Improvements

    • RUST-1773 Merge duplicate extjson map parsing between OwnedOrBorrowedRawBsonVisitor and SeededVisitor

    Bugfixes

    • RUST-2028 Fix Decimal128 panic when parsing strings w/o a char boundary at idx 34 (thanks @arthurprs!)
    Open source →
  7. 2.11.0 05 Jun 2024
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.11.0 release of the bson crate.

    Highlighted Changes

    This release introduces the HumanReadable helper type; this provides more flexible control than the human_readable option, which is now deprecated.

    Full Release Notes

    New Features

    Bugfixes

    • minor: fix lifetime of RawElement::key (#473)
    • RUST-1933: Support deserializing $uuid extended JSON syntax (#474)
    Open source →
  8. 2.10.0 02 Apr 2024
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.10.0 release of the bson crate.

    Highlighted Changes

    This release adds several bugfixes and the RawDocumentBuf::append_ref method, providing a method equivalent to append for borrowed data. This can be useful for avoiding the need for intermediate buffers when the source data is borrowed.

    Full Release Notes

    New Features

    Bugfixes

    • RUST-1850 Fix a fuzzer failure (#460)
    • fix: access iterators from RawDocument without needing to convert to RawDocumentBuf (#462) (thanks @tychoish!)
    • fix: export RawElement type (#461) (thanks @tychoish!)
    • RUST-1892 Fix timestamp [de]serialization on big-endian machines (#465)
    • RUST-1899 Fix UUID string deserialization (#468)
    Open source →
  9. 2.9.0 25 Jan 2024
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.9.0 release of the bson crate.

    Highlighted Changes

    This release adds several externally contributed improvements!

    • A new RawIter type that iterates over elements in a document without deserializing them,
    • An improvement to the doc and bson macros (and their raw counterparts) that allows using types that implement Into<Bson> or Into<RawBson>,
    • An impl of From<&mut T> for Bson for types that implement Into<Bson>,
    • A smaller dependency tree thanks to updating the indexmap crate,
    • And a fix for the serde_with 3.x support for the Uuid type.

    Full Release Notes

    New Features

    Improvements

    Bugfixes

    Open source →
  10. 2.8.1 12 Dec 2023
    Release notes

    The MongoDB Rust driver team is pleased to announce the v2.8.1 release of the bson crate.

    Highlighted Changes

    This release fixes compilation for the wasm32-wasi target, which broke in the 2.8.0 release.

    Full Release Notes

    Bugfixes

    Open source →
  11. 2.8.0 11 Dec 2023

    Nothing published for this version

  12. 2.7.0 30 Aug 2023

    Nothing published for this version

  13. 2.6.1 20 Mar 2023

    Nothing published for this version

  14. 2.6.0 13 Mar 2023

    Nothing published for this version

  15. 2.5.0 12 Jan 2023

    Nothing published for this version

  16. 2.4.0 02 Aug 2022

    Nothing published for this version

  17. 2.3.0 03 Jun 2022

    Nothing published for this version

  18. 2.2.0 14 Apr 2022

    Nothing published for this version

  19. 2.2.0-beta.1 31 Mar 2022 pre-release

    Nothing published for this version

  20. 2.2.0-beta 25 Mar 2022 pre-release

    Nothing published for this version

  21. 2.1.0 14 Dec 2021

    Nothing published for this version

  22. 2.1.0-beta 16 Nov 2021 pre-release

    Nothing published for this version

  23. 2.0.1 12 Oct 2021

    Nothing published for this version

  24. 2.0.0 07 Sep 2021

    Nothing published for this version

  25. 2.0.0-beta.3 06 Aug 2021 pre-release

    Nothing published for this version

  26. 2.0.0-beta.2 25 Jun 2021 pre-release

    Nothing published for this version

  27. 2.0.0-beta.1 01 Jun 2021 pre-release

    Nothing published for this version

  28. 2.0.0-beta 14 May 2021 pre-release

    Nothing published for this version

  29. 1.2.4 12 Oct 2021

    Nothing published for this version

  30. 1.2.3 06 Aug 2021

    Nothing published for this version

  31. 1.2.2 07 Apr 2021

    Nothing published for this version

  32. 1.2.1 06 Apr 2021

    Nothing published for this version

  33. 1.2.0 12 Feb 2021

    Nothing published for this version

  34. 1.1.0 18 Aug 2020

    Nothing published for this version

  35. 1.1.0-beta 30 Jul 2020 pre-release

    Nothing published for this version

  36. 1.0.0 08 Jun 2020

    Nothing published for this version

  37. 0.15.0 03 Jun 2020

    Nothing published for this version

  38. 0.14.1 17 Mar 2020

    Nothing published for this version

  39. 0.14.0 31 Aug 2019

    Nothing published for this version

  40. 0.13.1 28 Aug 2019 withdrawn

    Nothing published for this version

  41. 0.13.0 11 Aug 2018

    Nothing published for this version

  42. 0.12.3 30 Jul 2018

    Nothing published for this version

  43. 0.12.2 11 Jul 2018

    Nothing published for this version

  44. 0.12.1 03 Jul 2018

    Nothing published for this version

  45. 0.12.0 03 Jul 2018

    Nothing published for this version

  46. 0.11.1 23 Feb 2018

    Nothing published for this version

  47. 0.11.0 10 Jan 2018

    Nothing published for this version

  48. 0.10.0 02 Oct 2017

    Nothing published for this version

  49. 0.9.1 30 Sep 2017

    Nothing published for this version

  50. 0.9.0 23 Jun 2017

    Nothing published for this version

  51. 0.8.0 30 May 2017

    Nothing published for this version

  52. 0.7.1 17 May 2017

    Nothing published for this version

  53. 0.7.0 23 Apr 2017

    Nothing published for this version

  54. 0.6.1 11 Apr 2017

    Nothing published for this version

  55. 0.6.0 15 Mar 2017

    Nothing published for this version

  56. 0.5.0 12 Mar 2017

    Nothing published for this version

  57. 0.4.4 04 Mar 2017

    Nothing published for this version

  58. 0.4.3 26 Feb 2017

    Nothing published for this version

  59. 0.4.2 24 Feb 2017

    Nothing published for this version

  60. 0.4.1 20 Feb 2017 withdrawn

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive