The MongoDB Rust driver team is pleased to announce the v3.3.0 release of the mongodb
crate, now available for download from crates.io.
Highlighted Changes
Compatibility With bson
3.0
This version of the driver provides the bson-3
feature, which allows opting in to use the 3.0 version of the bson
crate where the driver API exposes those types. Any usage without that feature (e.g. all existing projects) will continue to use the 2.x version. See the bson
3.0 migration guide for more information.
Improved Convenient Transaction API
With the stabilization of async closures, the convenient transaction API (StartTransaction::and_run
) has been deprecated in favor of StartTransaction::and_run2
, which provides the same functionality but without needing to box the closure or pass a distinct data argument.
GSSAPI Authentication Support
The driver now supports the use of GSSAPI for authentication of driver connections on Linux, MacOS, and Windows.
Minimum Server Version Increase
The minimum server version supported by the driver is now 4.2; support for 4.0 was deprecated in driver version 3.2.0 and has now been removed.
Full Release Notes
Impactful changes are listed below; for a complete list of changes see this GitHub query.
New Features
- RUST-1891 Implement Default on results structs (#1289)
- RUST-2140 Support the nsType field for change streams (#1316)
- RUST-2087 Add hint option to distinct (#1341)
- RUST-2090 gridfs helpers (#1351)
- RUST-2198 Add run_raw_command method (#1356) (thanks @beckerinj!)
- RUST-2166 Update convenient transactions API to use async closures (#1372)
- RUST-2217 Optionally support bson crate 3.0 (#1380)
- RUST-2235 Implement GSSAPI auth support for Linux and macOS (#1413)
- RUST-2245 Implement GSSAPI auth support for Windows (#1444)
- RUST-2078 Support QE with bulk write (#1445)
Improvements
- RUST-1765 Make slash between hosts and options in the URI optional (#1314)
- RUST-1954 Disallow commas in authMechanismProperties values (#1315)
- RUST-2171 Update rustls to 0.23 (#1322) (thanks @ctz!)
- RUST-2020 Ignore speculative authentication on reauthentication (#1320)
- RUST-2167 Deprecate hedged reads (#1330)
- RUST-2071 Increase batchSize for find when batchSize == limit (#1348)
- RUST-2095 Add an error message when marking primaries stale (#1346)
- RUST-663 Support $merge and $out executing on secondaries (#1360)
- RUST-1826 Use serde attribute to remove empty write concerns (#1392)
- RUST-2104 Implement From<std::net::SocketAddr> for ServerAddress (#1396)
- Update rustls to non-yanked version (#1439)
- RUST-1529 Use AWS SDK to get credentials (#1435)
- RUST-1529 Use AWS SDK for sigv4 signing (#1438)
- minor: include bson feature version in metadata (#1456)
- RUST-2190 Remove support for server 4.0 (#1461)
Bugfixes
- HELP-70689 Use openssl cert parsing when openssl-tls is enabled (#1302)
- HELP-68823 Fix invalid_me comparison and normalize host strings (#1319)
- RUST-2191 Fix type propagation for Aggregate::session (#1353)
- RUST-2131 Fix bulk write cursor iteration on load balanced topologies (#1358)
- RUST-2204 Enforce size limits on outgoing messages (#1369)
- RUST-2074 Fix retryability bug, add disabled test (#1427)
- RUST-2184 Accept any BSON number for CreateCollectionOptions::size (#1460)
- Always use "admin" target_db during handshake (#1463) (thanks @krinart!)