Skip to content

Commit 3717287

Browse files
authored
Merge pull request #99 from coblox/chore/feature-flag-tls
feat: allow to switch tls-provider in client and grpc
2 parents 1f905be + 86fe7d1 commit 3717287

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

ark-bdk-wallet/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
anyhow = "1"
8-
ark-client = { path = "../ark-client" }
8+
ark-client = { path = "../ark-client", default-features = false }
99
ark-core = { path = "../ark-core" }
1010
async-stream = "0.3"
1111
bdk_wallet = "1.0.0"

ark-client/Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ tokio = { version = "1.41.0", features = ["sync", "rt-multi-thread"] }
2424
tracing = "0.1.37"
2525

2626
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
27-
ark-grpc = { path = "../ark-grpc", version = "0.7.0" }
27+
ark-grpc = { path = "../ark-grpc", version = "0.7.0", default-features = false }
2828
backon = { version = "1", features = ["tokio-sleep"] }
29-
tonic = { version = "0.12", features = ["tls-native-roots"] }
29+
tonic = "0.12"
3030

3131
# TODO: We do not yet support WASM in `ark-client`. To support WASM in this high level crate, we
3232
# will need to make it possible to use either `ark-grpc` or `ark-rest`. The current default is
@@ -44,3 +44,8 @@ tonic-build = { version = "0.12.3" }
4444

4545
[dev-dependencies]
4646
tokio = { version = "1.41.0", features = ["macros", "rt"] }
47+
48+
[features]
49+
default = ["tls-native-roots"]
50+
tls-native-roots = ["tonic/tls-native-roots", "ark-grpc/tls-native-roots"]
51+
tls-webpki-roots = ["tonic/tls-webpki-roots", "ark-grpc/tls-webpki-roots"]

ark-grpc/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ musig = { package = "ark-secp256k1", path = "../ark-rust-secp256k1", features =
1919
prost = { version = "0.13", default-features = false }
2020
prost-types = { version = "0.13", default-features = false }
2121
serde_json = "1.0"
22-
tonic = { version = "0.12", default-features = false, features = ["tls-native-roots", "transport", "codegen", "prost"] }
22+
tonic = { version = "0.12", default-features = false, features = ["transport", "codegen", "prost"] }
2323

2424
[target.'cfg(genproto)'.build-dependencies]
2525
tonic-build = { version = "0.12" }
2626

27+
[features]
28+
default = ["tls-webpki-roots"]
29+
tls-native-roots = ["tonic/tls-native-roots"]
30+
tls-webpki-roots = ["tonic/tls-webpki-roots"]
31+
2732
[dev-dependencies]
2833
console_log = "1"
2934
tokio = { version = "1.41", features = ["macros", "rt"] }

0 commit comments

Comments
 (0)