You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It depends on the [`bson`](https://docs.rs/bson) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.
4
+
This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It uses the [`bson`](https://docs.rs/bson) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.
5
5
6
6
## Index
7
7
-[Installation](#Installation)
@@ -26,16 +26,16 @@ This repository contains the officially supported MongoDB Rust driver, a client
26
26
| Driver Version | Required Rust Version |
27
27
|:--------------:|:---------------------:|
28
28
| master | 1.43+ |
29
+
| 0.11.x | 1.43+
29
30
| 0.10.x | 1.43+ |
30
31
| 0.9.x | 1.39+ |
31
32
- MongoDB 3.6+
32
33
33
34
### Importing
34
-
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`. You will also want to add [`bson`](https://docs.rs/bson) as well.
35
+
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`.
35
36
```toml
36
37
[dependencies]
37
-
mongodb = "0.10.0"
38
-
bson = "0.14.1"
38
+
mongodb = "0.11.0"
39
39
```
40
40
41
41
#### Configuring the async runtime
@@ -44,7 +44,7 @@ The driver supports both of the most popular async runtime crates, namely [`toki
44
44
For example, to instruct the driver to work with [`async-std`](https://crates.io/crates/async-std), add the following to your `Cargo.toml`:
45
45
```toml
46
46
[dependencies.mongodb]
47
-
version = "0.10.0"
47
+
version = "0.11.0"
48
48
default-features = false
49
49
features = ["async-std-runtime"]
50
50
```
@@ -53,7 +53,7 @@ features = ["async-std-runtime"]
53
53
The driver also provides a blocking sync API. To enable this, add the `"sync"` feature to your `Cargo.toml`:
54
54
```toml
55
55
[dependencies.mongodb]
56
-
version = "0.10.0"
56
+
version = "0.11.0"
57
57
default-features = false
58
58
features = ["sync"]
59
59
```
@@ -94,7 +94,7 @@ for collection_name in db.list_collection_names(None).await? {
// Query the documents in the collection with a filter and an option.
@@ -141,8 +143,10 @@ The driver also provides a blocking sync API. See the [Installation](#enabling-t
141
143
142
144
The various sync-specific types are found in the `mongodb::sync` submodule rather than in the crate's top level like in the async API. The sync API calls through to the async API internally though, so it looks and behaves similarly to it.
0 commit comments