-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
50 lines (48 loc) · 2.03 KB
/
Copy pathCargo.toml
File metadata and controls
50 lines (48 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[package]
name = "whois-rdap"
version = "0.2.0"
edition = "2024"
[dependencies]
anyhow = "1.0"
# default-features = false drops: color (anstream/anstyle), auto-update, wrap-help
clap = { version = "4.6", default-features = false, features = [
"std",
"help",
"usage",
"error-context",
"suggestions",
"derive",
] }
# default-features = false drops: charset (encoding_rs), http2 (h2), cookies,
# multipart, brotli, deflate, gzip, macos-system-certificate-store, socks
# RDAP returns small UTF-8 JSON over HTTPS – none of those are needed.
#
# rustls-no-provider: lets us pick ring instead of the default aws-lc-rs/aws-lc-sys
# (aws-lc-sys is a ~1.2MiB C library; ring is ~200KB pure Rust).
reqwest = { version = "0.13", default-features = false, features = [
"json",
"rustls-no-provider",
] }
# ring: lightweight Rust TLS crypto backend, replaces aws-lc-rs.
# We install it as the global rustls provider inside RdapClient::for_custom().
# tls12: keep TLS 1.2 support — some RDAP servers are still on it.
rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "std"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# tokio is ONLY needed by the binary (main.rs) for #[tokio::main].
# lib.rs has no direct tokio dependency — it exposes plain async fns that are
# runtime-agnostic. Downstream library consumers bring their own runtime and
# can freely choose any flavor, e.g.:
# tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
# and use #[tokio::main] (multi_thread is the default flavor).
# RdapClient is Send + Sync so it works across thread-pool tasks too.
tokio = { version = "1.52", default-features = false, features = [
"rt", # current_thread — enough for a sequential CLI
"macros", # #[tokio::main(flavor = "current_thread")]
] }
[profile.release]
lto = true
strip = true
opt-level = "z" # optimize for size (network latency dominates anyway)
panic = "abort"
codegen-units = 1 # allows better cross-crate inlining / dead-code elim