The official MongoDB driver for Rust, providing async and sync APIs to interact with MongoDB deployments.
The MongoDB Rust Driver is the official client library for connecting Rust applications to MongoDB databases. It provides a fully async API built on Tokio along with an optional sync API, enabling developers to perform all standard database operations like queries, inserts, updates, and deletions with type-safe BSON handling.
Rust developers building applications that require MongoDB database connectivity, particularly those working with async runtimes like Tokio or web frameworks such as Actix, Axum, or Rocket.
As the officially supported MongoDB driver for Rust, it offers guaranteed compatibility with MongoDB features, regular updates, and production-ready reliability. Its async-first design with optional sync support provides flexibility for different application architectures while maintaining high performance.
The official MongoDB Rust Driver
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As the officially supported driver, it guarantees compatibility with MongoDB features and receives regular updates, ensuring production reliability as highlighted in the README.
Built on Tokio, it provides high-performance, non-blocking database operations optimized for modern async Rust applications, with examples for web frameworks like Actix and Axum.
Offers an optional blocking sync API via the 'sync' feature flag, allowing synchronous applications to use the driver without async overhead, as detailed in the installation section.
Supports multiple TLS options (rustls default, OpenSSL via feature flag) and advanced authentication like AWS, Azure OIDC, and client-side encryption, enhancing secure deployments.
The README explicitly warns that dropping futures (e.g., via timeouts) can leave internal state inconsistent, requiring workarounds like spawning tasks, which adds complexity for developers.
On Windows, there's a known performance degradation with DNS lookups using the system configuration, forcing users to specify alternate resolvers for mongodb+srv connections.
Features like 'tracing-unstable' and 'text-indexes-unstable' are marked as unstable and may have breaking changes in minor releases, limiting their use in production.