Add sqlite-storage-rustls feature

This commit is contained in:
Maybe Waffle 2023-02-13 11:49:56 +04:00
parent 16e431bc7b
commit 119e305729
4 changed files with 12 additions and 6 deletions

View file

@ -88,7 +88,7 @@ jobs:
features: "--features full" features: "--features full"
- rust: nightly - rust: nightly
toolchain: nightly-2022-12-23 toolchain: nightly-2022-12-23
features: "--all-features" features: "--features full nightly"
- rust: msrv - rust: msrv
toolchain: 1.64.0 toolchain: 1.64.0
features: "--features full" features: "--features full"
@ -187,7 +187,7 @@ jobs:
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: clippy command: clippy
args: --all-targets --all-features args: --all-targets --features "full nightly"
doc: doc:
name: check docs name: check docs

View file

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- `Update::filter_chat_join_request` - `Update::filter_chat_join_request`
- `sqlite-storage-rustls` feature, that allows using sqlite storage without `native-tls`
## 0.12.0 - 2023-01-17 ## 0.12.0 - 2023-01-17

View file

@ -22,7 +22,9 @@ default = ["native-tls", "ctrlc_handler", "teloxide-core/default", "auto-send"]
webhooks = ["rand"] webhooks = ["rand"]
webhooks-axum = ["webhooks", "axum", "tower", "tower-http"] 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"] redis-storage = ["redis"]
cbor-serializer = ["serde_cbor"] cbor-serializer = ["serde_cbor"]
bincode-serializer = ["bincode"] bincode-serializer = ["bincode"]
@ -35,7 +37,7 @@ native-tls = ["teloxide-core/native-tls"]
rustls = ["teloxide-core/rustls"] rustls = ["teloxide-core/rustls"]
auto-send = ["teloxide-core/auto_send"] auto-send = ["teloxide-core/auto_send"]
throttle = ["teloxide-core/throttle"] 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"] trace-adaptor = ["teloxide-core/trace_adaptor"]
erased = ["teloxide-core/erased"] erased = ["teloxide-core/erased"]
@ -44,8 +46,11 @@ erased = ["teloxide-core/erased"]
nightly = ["teloxide-core/nightly"] nightly = ["teloxide-core/nightly"]
full = [ full = [
"webhooks",
"webhooks-axum", "webhooks-axum",
"sqlite-storage", "sqlite-storage",
# "sqlite-storage-rustls" is explicitly ommited here,
# since it conflicts with "sqlite-storage"
"redis-storage", "redis-storage",
"cbor-serializer", "cbor-serializer",
"bincode-serializer", "bincode-serializer",
@ -91,7 +96,6 @@ serde_with_macros = "1.4"
aquamarine = "0.1.11" aquamarine = "0.1.11"
sqlx = { version = "0.6", optional = true, default-features = false, features = [ sqlx = { version = "0.6", optional = true, default-features = false, features = [
"runtime-tokio-native-tls",
"macros", "macros",
"sqlite", "sqlite",
] } ] }

View file

@ -16,7 +16,8 @@
| `native-tls` | Enables the [`native-tls`] TLS implementation (**enabled by default**). | | `native-tls` | Enables the [`native-tls`] TLS implementation (**enabled by default**). |
| `rustls` | Enables the [`rustls`] TLS implementation. | | `rustls` | Enables the [`rustls`] TLS implementation. |
| `redis-storage` | Enables the [Redis] storage support for dialogues. | | `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. | | `cbor-serializer` | Enables the [CBOR] serializer for dialogues. |
| `bincode-serializer` | Enables the [Bincode] serializer for dialogues. | | `bincode-serializer` | Enables the [Bincode] serializer for dialogues. |