Skip to content

Commit

Permalink
Merge pull request #94 from taosdata/enhance/taos-ws-with-rustls
Browse files Browse the repository at this point in the history
enh(ws): add features `rustls`/`native-tls` for ssl libs
  • Loading branch information
zitsen authored Nov 22, 2022
2 parents eab128e + 8e01a72 commit 0c39c7d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions taos-ws-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ pretty_env_logger = "0.4.0"

[features]
native-tls-vendored = ["taos-ws/native-tls-vendored"]
native-tls = ["taos-ws/native-tls"]
rustls = ["taos-ws/rustls"]
11 changes: 9 additions & 2 deletions taos-ws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ serde_with = "2.0.0"
taos-query = { path = "../taos-query", version = "0.3.5" }
thiserror = "1"
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.17", features = ["native-tls"] }
tokio-tungstenite = { version = "0.17" }

[dev-dependencies]
pretty_env_logger = "0.4.0"

[package.metadata.docs.rs]
features = ["native-tls", "__rustls-tls"]

[features]
default = ["tmq"]
native-tls-vendored = ["tokio-tungstenite/native-tls-vendored"]

rustls = ["tokio-tungstenite/__rustls-tls"]
native-tls = ["tokio-tungstenite/native-tls"]
native-tls-vendored = ["tokio-tungstenite/native-tls-vendored","native-tls"]
sync = []
tmq = []
4 changes: 3 additions & 1 deletion taos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ serde_json = "1"
tokio = { version = "1", features = ["full"] }

[features]
default = ["ws", "native", "r2d2"]
default = ["ws-rustls", "native", "r2d2"]
ws = ["taos-ws"]
optin = ["taos-optin"]
native = ["taos-sys"]
r2d2 = ["taos-query/r2d2"]
ws-native-tls = ["taos-ws", "taos-ws/native-tls-vendored"]
ws-rustls = ["taos-ws", "taos-ws/rustls"]

0 comments on commit 0c39c7d

Please sign in to comment.