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
Copy file name to clipboardexpand all lines: README.md
+11-3
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ SQLx is an async, pure Rust<sub>†</sub> SQL crate featuring compile-time check
66
66
67
67
***Pure Rust**. The Postgres and MySQL/MariaDB drivers are written in pure Rust using **zero** unsafe<sub>††</sub> code.
68
68
69
-
***Runtime Agnostic**. Works on different runtimes ([async-std](https://crates.io/crates/async-std) / [tokio](https://crates.io/crates/tokio) / [actix](https://crates.io/crates/actix-rt)).
69
+
***Runtime Agnostic**. Works on different runtimes ([async-std](https://crates.io/crates/async-std) / [tokio](https://crates.io/crates/tokio) / [actix](https://crates.io/crates/actix-rt)) and TLS backends ([native-tls](https://crates.io/crates/native-tls), [rustls](https://crates.io/crates/rustls)).
70
70
71
71
<sub><sup>† The SQLite driver uses the libsqlite3 C library as SQLite is an embedded database (the only way
72
72
we could be pure Rust for SQLite is by porting _all_ of SQLite to Rust).</sup></sub>
@@ -109,12 +109,14 @@ SQLx is compatible with the [`async-std`], [`tokio`] and [`actix`] runtimes.
By default, you get `async-std`. If you want a different runtime or TLS backend, just disable the default features and activate the corresponding feature, for example for tokio:
112
+
You can also select between [`native-tls`] and [`rustls`] for the TLS backend.
113
+
114
+
By default, you get `async-std` + `native-tls`. If you want a different runtime or TLS backend, just disable the default features and activate the corresponding feature, for example for tokio + rustls:
113
115
114
116
```toml
115
117
# Cargo.toml
116
118
[dependencies]
117
-
sqlx = { version = "0.4.0-beta.1", default-features = false, features = [ "runtime-tokio-native-tls", "macros" ] }
119
+
sqlx = { version = "0.4.0-beta.1", default-features = false, features = [ "runtime-tokio-rustls", "macros" ] }
118
120
```
119
121
120
122
<sub><sup>The runtime and TLS backend not being separate feature sets to select is a workaround for a [Cargo issue](https://github.com/rust-lang/cargo/issues/3494).</sup></sub>
@@ -123,10 +125,16 @@ sqlx = { version = "0.4.0-beta.1", default-features = false, features = [ "runti
123
125
124
126
*`runtime-async-std-native-tls` (on by default): Use the `async-std` runtime and `native-tls` TLS backend.
125
127
128
+
*`runtime-async-std-rustls`: Use the `async-std` runtime and `rustls` TLS backend.
129
+
126
130
*`runtime-tokio-native-tls`: Use the `tokio` runtime and `native-tls` TLS backend.
127
131
132
+
*`runtime-tokio-rustls`: Use the `tokio` runtime and `rustls` TLS backend.
133
+
128
134
*`runtime-actix-native-tls`: Use the `actix` runtime and `native-tls` TLS backend.
129
135
136
+
*`runtime-actix-rustls`: Use the `actix` runtime and `rustls` TLS backend.
137
+
130
138
*`postgres`: Add support for the Postgres database server.
131
139
132
140
*`mysql`: Add support for the MySQL (and MariaDB) database server.
0 commit comments