Bson Rust Versions Save

Encoding and decoding support for BSON in Rust

v2.10.0

1 month ago

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

  • RUST-1512 Provide a method to append a borrowed value (#463)

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)

v2.9.0

4 months ago

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

  • RUST-1815 provide lazy iterator implementation (thanks @tychoish!)
  • RUST-1716 Add BSON Binary Data subtype Sensitive (#454)

Improvements

  • RUST-1822 Allow using the {,raw}{bson,doc} with types implementing Into<{,Raw}Bson> (#450) (thanks @tyilo!)
  • RUST-1825 Implement From<&mut T> for Bson (#452) (thanks @tyilo!)
  • RUST-1814 minor: bump indexmap to 2.1.0 (#448) (thanks @froydnj!)

Bugfixes

  • RUST-1828 Fix feature name for serde_with Uuid implementation (#453) (thanks @jonasbb!)

v2.8.1

5 months ago

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

  • Fix compilation on wasm32-wasi target #445 (thanks @tyranron!)

v2.8.0

5 months ago

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

Highlighted Changes

This release adds optimizations to the serde integration that show up to 50% deserialization speed improvement in our benchmarks, as well as a variety of user-submitted fixes.

Full Release Notes

Improvements

  • RUST-1132 Implement DeserializeSeed for owned and borrowed raw documents (#433)
  • RUST-1780 Bump MSRV to 1.61.0, upgrade ahash to 0.8.5 in Cargo.lock.msrv (#436) (thanks @stIncMale!)
  • minor: use random() directly in gen_process_id (#438) (thanks @pdeva!)

Bugfixes

  • RUST-1769 Fix check-rustdoc (#432) (thanks @stIncMale!)
  • RUST-1805 Only use js-sys with unknown os (#442) (thanks @tqwewe!)

v2.7.0

9 months ago

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

Highlighted Changes

This release adds optional integration with serde_with 3.x, duration_since methods to DateTime, and updates some dependencies.

Full Release Notes

New Features

  • RUST-1677 Add duration_since methods to DateTime (#417)
  • RUST-1699 Add serde_with 3.x integration (#422)

Improvements

  • update ahash from 0.7.6 to 0.8.3 (#414) (thanks @Liyixin95!)
  • move lazy_static to once_cell (#416) (thanks @attila-lin!)

Bugfixes

  • RUST-1714 Use serde traits when only serde_with-3 is enabled (#423) (thanks @maximdeclercq!)

v2.6.1

1 year ago

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

Highlighted Changes

This release updates the documentation for the Decimal128 type to demonstrate conversion to and from human-readable strings.

Full Release Notes

Improvements

  • RUST-1617 Update documentation for Decimal128 type

v2.6.0

1 year ago

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

Highlighted Changes

This release includes support for conversion between human-readable strings and the Decimal128 BSON type. It also adds tests to verify that the Rust BSON library builds on WASM.

Full Release Notes

New Features

  • RUST-1592 Support decimal128 to/from human-readable strings (#404)

Improvements

  • minor: improve serde documentation of DateTime and ObjectId (#401)
  • RUST-504 Use js timestamps when generating objectids (#406)

Tasks

  • RUST-1613 Update feature flags table (#407)

v2.5.0

1 year ago

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

Highlighted Changes

This release sees the addition of a wide variety of helper functions, largely focused on making common type conversions more convenient:

  • Binary::from_base64 allows constructing a Binary value from a base64-encoded string without having to use another crate.
  • i64_as_bson_datetime provides Serde helpers for representing bson DateTime values as rust i64 fields.
  • Binary::as_raw_binary and RawBinaryRef::to_binary allow easy interconversion between the parsed and raw slice reference types for binary data.
  • RawBson and RawDocumentBuf now implement TryFrom for their respective parsed types (Bson and Document).
  • Document::iter_mut provides an iterator over mutable references to the contained Bson values.

Full Release Notes

New Features

  • RUST-1385 Add binary/raw conversions (#370)
  • RUST-1480 Add a TryFrom<Bson> impl for RawBson (#373)
  • RUST-1534: implement iter_mut on Document (#382)
  • RUST-1540 impl i64_as_datetime (#383)
  • RUST-1225 Add base64 string constructor to Binary (#365)
  • RUST-1540 Rename i64_as_datetime to i64_as_bson_datetime (#393)

Improvements

  • docs(readme): fix broken hyperlink (#375) (thanks satyarohith!)
  • RUST-1062 More efficiently serialize array indexes (#384)
  • Fix links in the Feature Flags table. (#388) (thanks judy2k!)
  • RUST-782 Add hyperlinks for all types in rustdoc (#389)

Tasks

  • RUST-1440 bump bson clippy version to 1.63.0 (#372)
  • fix for stale issues action
  • minor: bump clippy to 1.65 (#387)

v2.4.0

1 year ago

Description

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

Highlighted Changes

The following sections detail some of the more important changes included in this release. For a full list of changes, see the Full Release Notes section below.

Support for 1.x of the uuid crate

The bson crate now has a uuid-1 feature that provides an API for interoperation with versions 1.x of the uuid crate, similar to the existing uuid-0_8 feature. Internal usage of uuid now uses 1.x, so downstream crates without a need for 0.8 will no longer transitively depend on both version.

Builder for DateTime values

The DateTime type now provides a builder that allows convenient construction from a given year, month, day, and optionally, an hour, minute, second and millisecond.

Full Release Notes

New Features

  • RUST-1305 Add support for version 1.x of the uuid crate to the bson crate
  • RUST-1198 Support creating bson::DateTime from a given year/month/date/hour/minute/second/millisecond

Tasks

  • RUST-1398 Pin clippy version to 1.62.0
  • RUST-1374 Pin all dependencies when checking MSRV compilation

v2.3.0

1 year ago

Description

The MongoDB Rust driver team is pleased to announce the 2.3.0 release of the bson crate. This release increases the crate's MSRV to 1.53 and makes the crate's dependency on chrono optional.

Full Release Notes

Task

  • RUST-1263 Bump MSRV to 1.53 (#352)

Improvement

  • RUST-1129 Replace chrono dependency with time (#352)