Skip to content

Commit

Permalink
Added Cargo features for rustls
Browse files Browse the repository at this point in the history
  • Loading branch information
negi-grass committed Feb 28, 2023
1 parent 6a2e9ff commit 243b357
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 1 deletion.
136 changes: 136 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ autoexamples = false
all-features = true

[features]
default = ["native-tls"]

full = ["binance", "bitflyer", "bybit", "coincheck"]
binance = ["dep:crypto-botters-binance"]
bitflyer = ["dep:crypto-botters-bitflyer"]
bybit = ["dep:crypto-botters-bybit"]
coincheck = ["dep:crypto-botters-coincheck"]

native-tls = ["generic-api-client/native-tls"]
native-tls-vendored = ["generic-api-client/native-tls-vendored"]
rustls-tls-native-roots = ["generic-api-client/rustls-tls-native-roots"]
rustls-tls-webpki-roots = ["generic-api-client/rustls-tls-webpki-roots"]

[dependencies]
generic-api-client = { version = "0.1", path = "generic-api-client" }
crypto-botters-api = { version = "0.1", path = "crypto-botters-api" }
Expand Down
8 changes: 7 additions & 1 deletion generic-api-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ categories = ["api-bindings", "asynchronous"]

[dependencies]
tokio = { version = "1.25.0", features = ["time", "sync", "net", "macros"] }
tokio-tungstenite = { version = "0.18.0", features = ["native-tls"] }
tokio-tungstenite = "0.18.0"
reqwest = "0.11.14"
futures-util = "0.3.26"
serde = "1.0.152"
parking_lot = "0.12.1"
bytes = "1.4.0"
log = "0.4.17"
thiserror = "1.0.38"

[features]
native-tls = ["reqwest/native-tls", "tokio-tungstenite/native-tls"]
native-tls-vendored = ["reqwest/native-tls-vendored", "tokio-tungstenite/native-tls-vendored"]
rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots", "tokio-tungstenite/rustls-tls-native-roots"]
rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots", "tokio-tungstenite/rustls-tls-webpki-roots"]

0 comments on commit 243b357

Please sign in to comment.