From 4875934d5aa782c94ae422e9fa9ab6d04bfe076a Mon Sep 17 00:00:00 2001 From: Charles Vandevoorde Date: Wed, 19 Apr 2023 18:23:44 +0200 Subject: [PATCH] remove sqlx runtime features from the library According to the cargo book ([source](https://doc.rust-lang.org/cargo/reference/features.html#feature-unification)): > When a dependency is used by multiple packages, Cargo will use the union of all features enabled on that dependency when building it. This helps ensure that only a single copy of the dependency is used. See the features section of the resolver documentation for more details. So, the library should not force a sqlx runtime to the end-user. The library should let the user decide which runtime to enable and cargo will unified the features by itself. --- Cargo.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b452a5d..4de328b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,22 +15,20 @@ categories = ["web-programming::http-server", "web-programming", "database"] features = ["pg", "sqlite", "mysql", "async_std"] [features] -default = ["native-tls"] sqlite = ["sqlx/sqlite"] pg = ["sqlx/postgres", "sqlx/json"] -native-tls = ["sqlx/runtime-async-std-native-tls"] -rustls = ["sqlx/runtime-async-std-rustls"] -async_std = ["async-std"] mysql = ["sqlx/mysql", "sqlx/json"] +async_std = ["dep:async-std"] + [dependencies] async-session = "3.0.0" -sqlx = { version = "0.6.2", features = ["chrono"] } +sqlx = { version = "0.6.3", features = ["chrono"] } async-std = { version = "1.12.0", optional = true } [dev-dependencies] async-std = { version = "1.12.0", features = ["attributes"] } [dev-dependencies.sqlx] -version = "0.6.2" +version = "0.6.3" features = ["chrono", "runtime-async-std-native-tls"]