-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathCargo.toml
More file actions
169 lines (142 loc) · 5.27 KB
/
Cargo.toml
File metadata and controls
169 lines (142 loc) · 5.27 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[package]
name = "pup"
version = "0.63.0"
edition = "2021"
rust-version = "1.93.1"
publish = false
[lib]
name = "pup_wasm"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[features]
default = ["native"]
native = [
"dep:datadog-api-client",
"datadog-api-client/native-tls",
"datadog-api-client/zstd",
"datadog-api-client/retry",
"dep:keyring",
"dep:dirs",
"dep:open",
"dep:sha2",
"dep:base64",
"dep:rand",
"dep:url",
"dep:aes-gcm",
"dep:uuid",
"dep:chrono",
"dep:regex",
"dep:clap",
"dep:clap_complete",
"tokio/full",
"comfy-table/tty",
"dep:tokio-tungstenite",
"dep:yamux",
"dep:russh",
"dep:ssh-key",
"dep:futures",
"dep:tokio-util",
]
wasi = [
"dep:datadog-api-client",
"datadog-api-client/rustls-tls",
"dep:sha2",
"dep:base64",
"dep:rand",
"dep:url",
"dep:aes-gcm",
"dep:uuid",
"dep:chrono",
"dep:regex",
"dep:clap",
"dep:clap_complete",
"tokio/rt",
"tokio/macros",
"tokio/time",
]
vendored-openssl = ["dep:openssl"]
browser = [
"dep:datadog-api-client",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
"dep:js-sys",
"dep:web-sys",
"dep:serde-wasm-bindgen",
"dep:getrandom",
]
[dependencies]
# CLI (optional — not needed for browser WASM library)
clap = { version = "4", features = ["derive"], optional = true }
clap_complete = { version = "4", optional = true }
# Async runtime (features selected by native/wasi feature flags)
tokio = { version = "1", default-features = false }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order", "unbounded_depth"] }
serde_stacker = "0.1"
serde_norway = "0.9"
# HTTP — stream feature omitted on wasm32 (wasm-streams pulls in wasm-bindgen,
# incompatible with wasm32-wasip1; bytes_stream() calls are all cfg(not(wasm32)))
# Held at <0.13.3: reqwest 0.13.3 widened its tokio cfg to include wasm32-wasi,
# which then trips tokio's wasm compile_error gate via hyper-util's tokio/net.
reqwest = { version = ">=0.13, <0.13.3", features = ["json", "form"] }
http = "1"
# Error handling
anyhow = "1"
# POSIX shell word splitting (used for alias expansion)
shell-words = "1"
# UUID parsing (version-matched to DD client)
uuid = { version = "1", features = ["v4"], optional = true }
# Time
chrono = { version = "0.4", optional = true }
regex = { version = "1", optional = true }
# Output formatting (tty feature disabled for WASM — no crossterm)
comfy-table = { version = "7", default-features = false }
# Auth — OAuth2 PKCE + token storage (optional — not needed for browser)
sha2 = { version = "0.11", optional = true }
base64 = { version = "0.22", optional = true }
# Pinned to 0.10.1+ to prevent the SDK rev (d70b186e) from pulling in the older 0.10.0 patch
rand = { version = "0.10.1", optional = true }
url = { version = "2", optional = true }
# Vendored OpenSSL for cross-compilation (optional — only for CI cross-builds)
openssl = { version = "0.10", features = ["vendored"], optional = true }
# Crypto for fallback storage (optional — not needed for browser)
aes-gcm = { version = "0.10", optional = true }
# ---- Native-only dependencies ----
# Synthetics tunnel
tokio-tungstenite = { version = "0.29", features = ["native-tls"], optional = true }
yamux = { version = "0.13", optional = true }
russh = { version = "0.60", optional = true }
ssh-key = { version = "0.6", features = ["p256", "std"], optional = true }
futures = { version = "0.3", optional = true }
tokio-util = { version = "0.7", features = ["compat", "io"], optional = true }
# Datadog API client — pinned to 0.30.0 release tag
# Use default-features = false; feature sets are activated per-target via features above
datadog-api-client = { git = "https://github.com/DataDog/datadog-api-client-rust", rev = "aa0c8416e3af27038cf6a17e74ff1bf11d6bc1a6", optional = true, default-features = false }
# HTTP middleware (version-matched to DD client; compiles on all targets)
reqwest-middleware = "0.5"
async-trait = "0.1"
# Stream extension trait (used for paginated API streams on all targets;
# already pulled in transitively via reqwest/hyper-util)
futures-util = { version = "0.3", default-features = false }
# OS keychain for token storage
keyring = { version = "3", features = ["apple-native", "linux-native", "windows-native"], optional = true }
# XDG config directory resolution
dirs = { version = "6", optional = true }
# Browser opening for OAuth login
open = { version = "5", optional = true }
# ---- Browser WASM dependencies (wasm-bindgen) ----
wasm-bindgen = { version = "=0.2.114", optional = true }
wasm-bindgen-futures = { version = "=0.4.64", optional = true }
js-sys = { version = "=0.3.91", optional = true }
web-sys = { version = "=0.3.91", features = ["Window", "Storage"], optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
# RNG support in browser WASM (getrandom 0.4 — wasm_js feature enables JS crypto API)
getrandom = { version = "0.4", features = ["wasm_js"], optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { version = ">=0.13, <0.13.3", features = ["stream"] }
[target.'cfg(target_os = "macos")'.dependencies]
security-framework = "3.7"
security-framework-sys = "2.17"
[dev-dependencies]
mockito = "1"