diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40b4d815..72499188 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: features: "--features full" - rust: nightly toolchain: nightly-2022-12-23 - features: "--all-features" + features: "--features full nightly" - rust: msrv toolchain: 1.64.0 features: "--features full" @@ -187,7 +187,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: --all-targets --all-features + args: --all-targets --features "full nightly" doc: name: check docs diff --git a/CHANGELOG.md b/CHANGELOG.md index b4575c5f..ffe3154e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `Update::filter_chat_join_request` +- `sqlite-storage-rustls` feature, that allows using sqlite storage without `native-tls` ## 0.12.0 - 2023-01-17 diff --git a/crates/teloxide/Cargo.toml b/crates/teloxide/Cargo.toml index e4034f62..b38e5418 100644 --- a/crates/teloxide/Cargo.toml +++ b/crates/teloxide/Cargo.toml @@ -22,7 +22,9 @@ default = ["native-tls", "ctrlc_handler", "teloxide-core/default", "auto-send"] webhooks = ["rand"] webhooks-axum = ["webhooks", "axum", "tower", "tower-http"] -sqlite-storage = ["sqlx"] +# FIXME: rename `sqlite-storage` -> `sqlite-storage-nativetls` +sqlite-storage = ["sqlx", "sqlx/runtime-tokio-native-tls", "native-tls"] +sqlite-storage-rustls = ["sqlx", "sqlx/runtime-tokio-rustls", "rustls"] redis-storage = ["redis"] cbor-serializer = ["serde_cbor"] bincode-serializer = ["bincode"] @@ -35,7 +37,7 @@ native-tls = ["teloxide-core/native-tls"] rustls = ["teloxide-core/rustls"] auto-send = ["teloxide-core/auto_send"] throttle = ["teloxide-core/throttle"] -cache-me = ["teloxide-core/cache_me"] +cache-me = ["teloxide-core/cache_me"] # FIXME: why teloxide and core use - _ differently? trace-adaptor = ["teloxide-core/trace_adaptor"] erased = ["teloxide-core/erased"] @@ -44,8 +46,11 @@ erased = ["teloxide-core/erased"] nightly = ["teloxide-core/nightly"] full = [ + "webhooks", "webhooks-axum", "sqlite-storage", + # "sqlite-storage-rustls" is explicitly ommited here, + # since it conflicts with "sqlite-storage" "redis-storage", "cbor-serializer", "bincode-serializer", @@ -91,7 +96,6 @@ serde_with_macros = "1.4" aquamarine = "0.1.11" sqlx = { version = "0.6", optional = true, default-features = false, features = [ - "runtime-tokio-native-tls", "macros", "sqlite", ] } diff --git a/crates/teloxide/src/features.md b/crates/teloxide/src/features.md index fb1680e9..a871ee1b 100644 --- a/crates/teloxide/src/features.md +++ b/crates/teloxide/src/features.md @@ -16,7 +16,8 @@ | `native-tls` | Enables the [`native-tls`] TLS implementation (**enabled by default**). | | `rustls` | Enables the [`rustls`] TLS implementation. | | `redis-storage` | Enables the [Redis] storage support for dialogues. | -| `sqlite-storage` | Enables the [Sqlite] storage support for dialogues. | +| `sqlite-storage` | Enables the [Sqlite] storage support for dialogues (depends on `native-tls`). | +| `sqlite-storage-rustls` | Enables the [Sqlite] storage support for dialogues (depends on `rustls`, conflicts with `sqlite-storage`). | | `cbor-serializer` | Enables the [CBOR] serializer for dialogues. | | `bincode-serializer` | Enables the [Bincode] serializer for dialogues. |