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"
- 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

View file

@ -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

View file

@ -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",
] }

View file

@ -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. |