Skip to content

Commit 5d2046f

Browse files
authored
Merge pull request #18 from dfinity/igor/refactor
Hide ACME & Vector under a feature
2 parents 777a5fa + 5329188 commit 5d2046f

File tree

7 files changed

+404
-381
lines changed

7 files changed

+404
-381
lines changed

Cargo.toml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ repository = "https://github.com/dfinity/ic-bn-lib"
88
readme = "README.md"
99

1010
[features]
11-
clients-hyper = ["hyper-rustls"]
11+
clients-hyper = ["dep:hyper-rustls"]
12+
acme_dns = ["dep:instant-acme", "dep:cloudflare", "dep:backoff", "dep:rcgen"]
13+
acme_alpn = ["dep:rustls-acme"]
14+
vector = ["dep:vrl", "dep:prost", "dep:prost-types"]
1215

1316
[dependencies]
1417
ahash = "0.8.11"
1518
anyhow = "1.0.93"
1619
arc-swap = "1.7.1"
1720
async-trait = "0.1.83"
1821
axum = "0.8.1"
19-
backoff = { version = "0.4.0", features = ["tokio"] }
22+
backoff = { version = "0.4.0", features = ["tokio"], optional = true }
2023
base64 = "0.22.1"
2124
bytes = "1.10.0"
2225
clap = { version = "4.5.20", features = ["derive", "string", "env"] }
2326
chacha20poly1305 = "0.10.1"
2427
cloudflare = { version = "0.13.0", default-features = false, features = [
2528
"rustls-tls",
26-
] }
29+
], optional = true }
2730
derive-new = "0.7.0"
2831
fqdn = "0.4.1"
2932
futures = "0.3.31"
@@ -53,14 +56,14 @@ hyper-util = { version = "0.1.10", features = ["full"] }
5356
instant-acme = { version = "0.7.2", default-features = false, features = [
5457
"ring",
5558
"hyper-rustls",
56-
] }
59+
], optional = true }
5760
moka = { version = "0.12.8", features = ["sync", "future"] }
5861
parse-size = { version = "1.1.0", features = ["std"] }
5962
prometheus = "0.14.0"
60-
prost = "0.13.3"
61-
prost-types = "0.13.3"
63+
prost = { version = "0.13.3", optional = true }
64+
prost-types = { version = "0.13.3", optional = true }
6265
rand = "0.8.5"
63-
rcgen = "0.13.1"
66+
rcgen = { version = "0.13.1", optional = true }
6467
reqwest = { version = "0.12.12", default-features = false, features = [
6568
"http2",
6669
"rustls-tls",
@@ -76,11 +79,11 @@ rustls = { version = "0.23.18", default-features = false, features = [
7679
rustls-acme = { version = "0.13.0", default-features = false, features = [
7780
"tls12",
7881
"ring",
79-
] }
82+
], optional = true }
8083
rustls-pemfile = "2.2.0"
8184
rustls-platform-verifier = "0.5.0"
8285
scopeguard = "1.2.0"
83-
serde = "1.0.214"
86+
serde = { version = "1.0.214", features = ["derive"] }
8487
serde_json = "1.0.132"
8588
sha1 = "0.10.6"
8689
strum = { version = "0.27.1", features = ["derive"] }
@@ -100,7 +103,9 @@ tower-service = "0.3.3"
100103
tracing = "0.1.40"
101104
url = "2.5.3"
102105
uuid = { version = "1.16.0", features = ["v7"] }
103-
vrl = { version = "0.23.0", default-features = false, features = ["value"] }
106+
vrl = { version = "0.23.0", default-features = false, features = [
107+
"value",
108+
], optional = true }
104109
webpki-root-certs = "0.26.6"
105110
x509-parser = "0.17.0"
106111
zeroize = { version = "1.8.1", features = ["derive"] }

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pub mod http;
55
pub mod tasks;
66
pub mod tls;
77
pub mod types;
8+
#[cfg(feature = "vector")]
89
pub mod vector;
910

1011
/// Generic error

0 commit comments

Comments
 (0)