@@ -44,12 +44,9 @@ Configure the Asynchronous Runtime
44
44
----------------------------------
45
45
46
46
The driver uses the ``tokio`` runtime by default, so you can use this runtime without specifying any
47
- feature flags in your project's ``Cargo.toml`` file.
48
-
49
- You can explicitly choose the ``tokio`` runtime by adding the ``"tokio-runtime"`` feature flag to
50
- the ``mongodb`` dependency. For more information on installing the driver and adding feature flags,
51
- including an example that specifies the ``"tokio-runtime"`` feature flag, see the
52
- :ref:`rust-quick-start-download-and-install` step of the Quick Start.
47
+ feature flags in your project's ``Cargo.toml`` file. For more information on installing the driver
48
+ and configuring your ``Cargo.toml`` file, see the :ref:`rust-quick-start-download-and-install` step
49
+ of the Quick Start.
53
50
54
51
.. important::
55
52
@@ -80,32 +77,14 @@ Configure the Synchronous API
80
77
-----------------------------
81
78
82
79
The driver also provides a blocking, synchronous API.
83
- To use the synchronous API, add the either the ``"sync"`` or ``"tokio-sync"`` feature flag
84
- to the ``mongodb`` dependency.
85
-
86
- Select from the following tabs to see how to add feature flags for each corresponding crate:
87
-
88
- .. tabs::
89
-
90
- .. tab:: sync
91
- :tabid: synchronous-api
92
-
93
- .. code-block:: toml
80
+ To use the ``tokio`` synchronous API, add the ``"sync"`` feature flag to
81
+ the ``mongodb`` dependency, as shown in the following example:
94
82
95
- [dependencies.mongodb]
96
- version = "{+version+}"
97
- default-features = false
98
- features = ["sync"]
99
-
100
- .. tab:: tokio-sync
101
- :tabid: synchronous-api-tokio
102
-
103
- .. code-block:: toml
83
+ .. code-block:: toml
104
84
105
- [dependencies.mongodb]
106
- version = "{+version+}"
107
- default-features = false
108
- features = ["tokio-sync"]
85
+ [dependencies.mongodb]
86
+ version = "{+version+}"
87
+ features = ["sync"]
109
88
110
89
Synchronous Code Example
111
90
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -124,8 +103,8 @@ Use Both Asynchronous and Synchronous APIs
124
103
------------------------------------------
125
104
126
105
You can use both asynchronous and synchronous APIs in the same application.
127
- For example, to enable both ``tokio`` runtimes, you can add the ``tokio`` dependency to your dependencies list, and add the
128
- ``"tokio- sync"`` flag to the ``mongodb`` dependency:
106
+ For example, to enable both ``tokio`` runtimes, you can add the ``tokio`` dependency
107
+ to your dependencies list and add the ``"sync"`` flag to the ``mongodb`` dependency:
129
108
130
109
.. code-block:: toml
131
110
@@ -135,7 +114,7 @@ For example, to enable both ``tokio`` runtimes, you can add the ``tokio`` depend
135
114
136
115
[dependencies.mongodb]
137
116
version = "{+version+}"
138
- features = ["tokio- sync"]
117
+ features = ["sync"]
139
118
140
119
.. _rust-addtl-info-runtimes:
141
120
0 commit comments