Skip to content

v2.4.0-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@abr-egn abr-egn released this 13 Jan 04:41
· 309 commits to main since this release

The MongoDB Rust driver team is pleased to announce the v2.4.0-beta release of the mongodb crate, now available for download from crates.io. Please note that this is a beta release; the API for in-use encryption may change between this and the final 2.4.0 release.

Highlighted Changes

In-Use Encryption

This release brings support for Client-Side Field Level Encryption and Queryable Encryption. For detailed installation and usage instructions, please see the Encryption section of the driver manual. Please note that rewrapManyDataKey and automatic KMS credentials are not yet supported in the Rust driver.

GridFS

This release adds support for GridFS, allowing storage and retrieval of files that exceed the BSON document size limit. Please see the documentation of the new gridfs module for more information.

Streaming Monitoring Protocol

This release can now use the streaming monitoring protocol with MongoDB 4.4+ servers, reducing the time it takes for the client to discover server state changes compared to the old polling protocol.

Tracing Integration

The driver now emits tracing events at points of interest. To consume these events, you must enable the driver’s tracing-unstable feature flag and either:

  • register a tracing Subscriber in your application (see the tracing docs), OR
  • register a log-compatible logger in your application (see the log documentation for details), and enable a log compatibility feature flag for tracing, as detailed here.

This API is considered unstable as the tracing crate has not reached 1.0 yet; future minor versions of the driver may upgrade the tracing dependency to a new version which is not backwards-compatible with Subscribers that depend on older versions of tracing.

Events will be emitted under the following targets:

  • mongodb::command: Events related to command execution starting, succeeding, or failing.
  • mongodb::connection: Events related to the driver’s underlying connection pools and their connections.

Future work will introduce events under additional targets and may add driver-defined tracing spans for intervals of interest.

MSRV Increase

The minimum supported Rust version (MSRV) for this crate is now Rust 1.57.

Included Changes

Below are a selected list of changes with user impact; for a full list of changes see this GitHub query.

New Features

Improvements

  • RUST-360 Streaming monitoring protocol (#721)
  • RUST-1071 Add comment field to all options structs
  • minor: improve compile error when sync and tokio-runtime features are enabled (#788)
  • extend error types to impl serialization (#797) (Thanks borngraced!)

Bugfixes

  • RUST-1443 Ensure monitors close after server is removed from topology (#744)

Tasks

  • RUST-1253 Add AWS Lambda Examples (#714)
  • Deps: bump dependencies (#722) (Thanks Some-Dood!)
  • RUST-1445 Bump MSRV to 1.57 (#727)
  • RUST-1403 Remove oldtime feature from chrono dependency (#691) (Thanks oskgo!)
  • RUST-1450 Bump pretty_assertions dependency to 1.3.0 (#734)
  • Fix typo in README (#735) (Thanks sgasse!)
  • minor: document cursor/change stream Drop implementations (#745)
  • RUST-1560 Fix README typo (#798) (Thanks lonesometraveler!)