-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
424 lines (389 loc) · 12.6 KB
/
Cargo.toml
File metadata and controls
424 lines (389 loc) · 12.6 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
[workspace]
members = [
"crates/vx-cache",
"crates/vx-versions",
"crates/vx-starlark",
"crates/vx-runtime-core",
"crates/vx-runtime-archive",
"crates/vx-runtime-http",
"crates/vx-runtime",
"crates/vx-version-fetcher",
"crates/vx-resolver",
"crates/vx-manifest",
"crates/vx-paths",
"crates/vx-installer",
"crates/vx-config",
"crates/vx-setup",
"crates/vx-migration",
"crates/vx-env",
"crates/vx-extension",
"crates/vx-args",
"crates/vx-project-analyzer",
"crates/vx-console",
"crates/vx-output-filter",
"crates/vx-system-pm",
"crates/vx-ecosystem-pm",
"crates/vx-shim",
"crates/vx-metrics",
"crates/vx-cli",
# Providers (active - have Cargo.toml)
# Build tools
# Python runtime
# MSVC Build Tools (Windows-only)
# Media processing tools
# MSBuild
# 7-Zip file archiver
# Actionforge runner
# Dockerfile linter
# Meson build system (PyPI package alias)
# Conan C/C++ package manager (PyPI package alias)
# xmake build system
# WiX Toolset (Windows installer)
# curl (system detection only)
# Rez package manager (Python-based)
# Cloud CLI tools
# Container tools
# Kubernetes tools
# Data tools
# gRPC tools
# VM tools
# Git tools
# CLI utilities
# Terminal file manager / editor
# Git TUI / dotfile management
# Container / security tools
# Dev environment / version manager
# Web development / linting
# Security scanning
# Network diagnostics
# File watching / text processing
# Disk usage / system
# CI/CD linting
# Build tools
# Language runtimes
# Package managers
# DevOps tools
# Shell and terminal tools
# Task runners
# VCS tools
# AI tools
# IDE tools
# System tools
# Rust testing tools
# Rust dependency linting
# Rust security auditing
# Build cache
# Node.js build cache (monorepo tools)
# Python ecosystem tools
# Go development tools
# Protobuf tools
# Security/supply-chain tools
# Generic command bridge framework
"crates/vx-bridge",
# Workspace-hack crate (managed by cargo-hakari, reduces duplicate dependency compilations)
"crates/workspace-hack",
# MSBuild bridge (used by MSVC provider for node-gyp compatibility)
"crates/vx-msbuild-bridge",
]
resolver = "3"
# Root package for integration tests
[package]
name = "vx"
version.workspace = true
edition.workspace = true
description.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
keywords.workspace = true
categories.workspace = true
rust-version.workspace = true
# Main binary
[[bin]]
name = "vx"
path = "src/main.rs"
[dependencies]
vx-cli = { workspace = true }
tokio = { workspace = true }
anyhow = { workspace = true }
workspace-hack = { version = "0.1", path = "crates/workspace-hack" }
[features]
default = ["cdn-acceleration", "self-update"]
# CDN acceleration for faster downloads in China (uses rustls-tls, no OpenSSL required)
cdn-acceleration = ["vx-cli/cdn-acceleration"]
# Self-update via axoupdater (cargo-dist receipt-based fast path)
self-update = ["vx-cli/self-update"]
[dev-dependencies]
tokio = { workspace = true, features = ["test-util"] }
tempfile = { workspace = true }
# assert_cmd for cross-platform CLI testing
assert_cmd = { workspace = true }
predicates = { workspace = true }
# Test dependencies for integration tests
vx-runtime-core = { workspace = true }
walkdir.workspace = true
serde_json = { workspace = true }
rstest = "0.26"
[workspace.package]
version = "0.8.33" # x-release-please-version
edition = "2024"
description = "Universal Development Tool Manager"
license = "MIT"
repository = "https://github.com/loonghao/vx"
homepage = "https://github.com/loonghao/vx"
documentation = "https://github.com/loonghao/vx"
authors = ["Hal <hal.long@outlook.com>"]
keywords = ["version", "manager", "development", "tools", "cli"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
rust-version = "1.95.0"
[workspace.dependencies]
# Internal crates
vx-cache = { path = "crates/vx-cache" }
vx-starlark = { path = "crates/vx-starlark" }
vx-star-metadata = { path = "crates/vx-star-metadata" }
starlark = { version = "0.13" }
vx-runtime = { path = "crates/vx-runtime" }
vx-runtime-core = { path = "crates/vx-runtime-core" }
vx-runtime-archive = { path = "crates/vx-runtime-archive" }
vx-runtime-http = { path = "crates/vx-runtime-http" }
vx-versions = { path = "crates/vx-versions" }
vx-version-fetcher = { path = "crates/vx-version-fetcher" }
vx-resolver = { path = "crates/vx-resolver" }
vx-paths = { path = "crates/vx-paths" }
vx-installer = { path = "crates/vx-installer" }
vx-config = { path = "crates/vx-config" }
vx-setup = { path = "crates/vx-setup" }
vx-migration = { path = "crates/vx-migration" }
vx-env = { path = "crates/vx-env" }
vx-extension = { path = "crates/vx-extension" }
vx-project-analyzer = { path = "crates/vx-project-analyzer" }
vx-system-pm = { path = "crates/vx-system-pm" }
vx-ecosystem-pm = { path = "crates/vx-ecosystem-pm" }
vx-shim = { path = "crates/vx-shim" }
vx-metrics = { path = "crates/vx-metrics" }
vx-cli = { path = "crates/vx-cli" }
# Active providers (have Cargo.toml)
# Cloud CLI tools
# Container tools
# Kubernetes tools
# gRPC tools
# VM tools
# Git tools
# CLI utilities
# Build tools
# Language runtimes
# Package managers
# DevOps tools
# Shell and terminal tools
# Task runners
# VCS tools
# AI tools
# IDE tools
# System tools
# Build cache
# Node.js build cache (monorepo tools)
# Python ecosystem tools
# Go development tools
# Protobuf tools
# Security/supply-chain tools
# Version control
# Go ecosystem
# Node.js ecosystem
# Build tools
# Package managers
# Data tools
vx-console = { path = "crates/vx-console" }
vx-output-filter = { path = "crates/vx-output-filter" }
vx-manifest = { path = "crates/vx-manifest" }
vx-bridge = { path = "crates/vx-bridge" }
workspace-hack = { path = "crates/workspace-hack" }
# External dependencies
clap = { version = "4.4", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
toml = "1.0"
toml_edit = "0.25"
# Optimize tokio - only include needed features for better compile times
tokio = { version = "1.0", features = [
"rt-multi-thread",
"macros",
"fs",
"process",
] }
# HTTP client - use rustls TLS with aws-lc-rs (pure Rust, no OpenSSL dependency)
# reqwest 0.13+ defaults to aws-lc-rs instead of ring, enabling cross-compilation to all platforms
# including aarch64-pc-windows-msvc without assembly compilation issues
# Note: reqwest 0.13 makes form/query optional features, so we need to explicitly enable them
reqwest = { version = "0.13", features = [
"json",
"stream",
"form",
"rustls",
], default-features = false }
# Force rustls to use aws-lc-rs instead of ring for cross-compilation support
# This is required for aarch64-pc-windows-msvc target where ring's assembly code fails to compile
# ring has platform-specific assembly that doesn't work well with cross-compilation toolchains
rustls = { version = "0.23", default-features = false, features = [
"aws_lc_rs",
"logging",
"std",
"tls12",
] }
# Force rustls-webpki to use aws-lc-rs instead of ring
# This must be consistent with rustls configuration above
rustls-webpki = { version = "0.103", default-features = false, features = [
"aws-lc-rs",
"std",
] }
serde_json = "1.0.148"
anyhow = "1.0"
thiserror = "2.0"
dirs = "6.0"
# Optimize figment - only include needed features
figment = { version = "0.10", features = ["toml", "env"] }
which = "8.0"
regex = "1.10"
tempfile = "3.8"
# zip 8.1 - unified version to eliminate duplicate compilation with msvc-kit
# deflate: most common zip compression; zstd: modern fast compression; time: preserve file timestamps
# Disabled: aes-crypto, bzip2, deflate64, ppmd, lzma (rarely used in tool distribution archives)
zip = { version = "8.1", default-features = false, features = ["deflate", "zstd", "time"] }
tar = "0.4"
flate2 = "1.0"
xz2 = "0.1.7"
zstd = "0.13"
walkdir = "2.4"
glob = "0.3"
# Optimize chrono - remove serde feature if not needed everywhere
chrono = { version = "0.4", features = ["serde"] }
async-trait = "0.1"
indicatif = "0.18"
console = "0.16"
colored = "3.0"
dialoguer = "0.12"
futures-util = "0.3"
# Tracing ecosystem - standard for structured logging and spans
tracing = "0.1"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
# Requires Rust 2024 Edition (workspace edition = "2024", rust-version = "1.95.0")
tracing-indicatif = "0.3.14"
# Lazy static initialization
once_cell = "1.19"
# Semantic versioning
semver = "1.0"
# Self-replacement for binary updates (handles Windows exe locking)
self-replace = "1.5"
# Self-updater library for cargo-dist integration
# axoupdater 0.10+ uses axoasset 2.0+ which uses reqwest 0.13 with aws-lc-rs (no ring dependency)
# This resolves the reqwest 0.12/0.13 duplicate version issue
axoupdater = { version = "0.10", default-features = false, features = ["github_releases"] }
# Windows system calls for file operations
windows-sys = { version = "0.61", features = ["Win32_Storage_FileSystem"] }
# SHA256 checksum verification
sha2 = "0.11"
# Embed static assets in binary
rust-embed = "8.5"
# Retry with backoff - similar to Python's tenacity
backon = "1.6.0"
# Testing frameworks and utilities
rstest = "0.26"
tokio-test = "0.4"
test-case = "3.3"
pretty_assertions = "1.4"
mockall = "0.13"
wiremock = "0.6"
serial_test = "3.0"
assert_cmd = "2.0"
predicates = "3.1"
bincode = { version = "2.0.1", features = ["serde"] }
# Optimize compilation times
[profile.dev]
# Enable some optimizations for dependencies in debug mode
opt-level = 1
# Reduce debug info for faster compilation
debug = 1
# Enable incremental compilation for faster rebuilds
incremental = true
# Increase codegen units for faster parallel compilation in debug mode
codegen-units = 256
[profile.test]
# Inherit from dev but with faster linking
inherits = "dev"
# Reduce debug info for faster test compilation
debug = 0
# Faster linking with fewer codegen units
codegen-units = 16
# Disable optimizations for faster test compilation (overrides dev profile opt-level = 1)
opt-level = 0
[profile.release]
# Full optimizations for release
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
# Fast compilation profile for development
[profile.dev-fast]
inherits = "dev"
opt-level = 0
debug = false
incremental = true
# PGO optimization profiles
[profile.release-pgo]
inherits = "release"
lto = true
codegen-units = 1
panic = "abort"
# Profile for PGO data collection
[profile.pgo-gen]
inherits = "release"
debug = 1
lto = false
# cargo-dist: Profile for dist builds (thin LTO for faster builds)
[profile.dist]
inherits = "release"
lto = "thin"
# Config for 'dist'
[workspace.metadata.dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.30.3"
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell", "powershell", "homebrew"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
# A GitHub repo to push Homebrew formulas to
tap = "loonghao/homebrew-vx"
# The archive format to use for windows builds (defaults .zip)
windows-archive = ".zip"
# The archive format to use for non-windows builds (defaults .tar.xz)
unix-archive = ".tar.gz"
# Checksums to generate for each App
checksum = "sha256"
# GitHub release settings
github-releases = true
# Whether to enable GitHub Attestations
github-attestations = true
# Whether to install an updater program
install-updater = false
# Generate install receipts for axoupdater library integration
install-receipt = true
# Extra static files to include in each App (path relative to this Cargo.toml's dir)
include = ["LICENSE", "README.md", "CHANGELOG.md"]
# Whether to publish prereleases to package managers
publish-prereleases = false
# Skip checking whether the specified configuration files are up to date
allow-dirty = ["ci"]
# Whether dist should create a Github Release or use an existing draft
create-release = false
# Publish jobs to run in CI
publish-jobs = ["homebrew"]
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# =============================================================================
# Patches to unify duplicate dependency versions
# NOTE: [patch.crates-io] requires git or path, not version.
# The windows-sys version unification would require a fork or overlay.
# Consider using cargo-deny or dependabot to track version drift instead.
# =============================================================================