[CLI] Adds feature enabling Rustls usage rather than OpenSSL (#1584)

* Adds feature enabling Rustls usage rather than OpenSSL

* Update sqlx-cli/Cargo.toml

Removes extraneous openssl feature that slipped through

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
This commit is contained in:
SonicZentropy 2021-12-29 17:49:49 -06:00 committed by GitHub
parent 63ca2ccc6c
commit aa40f5fe5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -28,7 +28,6 @@ path = "src/bin/cargo-sqlx.rs"
dotenv = "0.15"
tokio = { version = "1.0.1", features = ["macros", "rt", "rt-multi-thread"] }
sqlx = { version = "0.5.9", path = "..", default-features = false, features = [
"runtime-async-std-native-tls",
"migrate",
"any",
"offline",
@ -53,7 +52,9 @@ openssl = { version = "0.10.30", optional = true }
remove_dir_all = "0.7.0"
[features]
default = ["postgres", "sqlite", "mysql"]
default = ["postgres", "sqlite", "mysql", "native-tls"]
rustls = ["sqlx/runtime-async-std-rustls"]
native-tls = ["sqlx/runtime-async-std-native-tls"]
# databases
mysql = ["sqlx/mysql"]

View file

@ -16,6 +16,9 @@ $ cargo install sqlx-cli --no-default-features --features postgres
# use vendored OpenSSL (build from source)
$ cargo install sqlx-cli --features openssl-vendored
# use Rustls rather than OpenSSL
$ cargo install sqlx-cli --no-default-features --features rustls
```
### Usage