| Crates.io | vcv-rs |
| lib.rs | vcv-rs |
| version | 0.1.0 |
| created_at | 2025-12-05 20:33:02.631456+00 |
| updated_at | 2025-12-05 20:33:02.631456+00 |
| description | Fast Visual Studio environment setup |
| homepage | https://github.com/ssoj13/vcv-rs |
| repository | https://github.com/ssoj13/vcv-rs |
| max_upload_size | |
| id | 1969127 |
| size | 35,863 |
Fast Visual Studio environment setup. ~50x faster than vcvars64.bat.
| Time | |
|---|---|
vcv |
~20ms |
vcvars64.bat |
~2000ms |
Microsoft's vcvars64.bat is slow because it:
dir commandsThis tool does the same job with:
vswhere.exe call (~20ms)# Build from source
cargo build --release
copy target\release\vcv.exe C:\bin\
# Apply environment (auto-detect shell)
vcv | iex
# Quiet mode
vcv -q | iex
# Add to $PROFILE
function vcvars { vcv @args | iex }
vcv -f cmd > vcenv.bat && vcenv.bat
:: Or inline
for /f "delims=" %i in ('vcv -f cmd') do @%i
eval $(vcv -f sh)
vcv -f json -q
-a, --arch Target architecture: x64 (default), x86, arm64
-s, --host Host architecture: x64 (default), x86, arm64
-f, --format Output format: auto (default), ps, cmd, sh, json
-v, --vs VS version year: 2017, 2019, 2022
-q, --quiet Suppress info messages
--no-validate Skip cl.exe validation
-h, --help Print help
# x64 native (default)
vcv | iex
# x86 target
vcv -a x86 | iex
# Cross-compile for ARM64
vcv -a arm64 | iex
# Use specific VS version
vcv -v 2019 | iex
# JSON for parsing
vcv -f json | ConvertFrom-Json
Note: All paths are prepended (added to the beginning), not replaced. Your existing PATH, INCLUDE, etc. remain intact - VS tools just get priority.
Sets these environment variables:
| Variable | Description |
|---|---|
PATH |
Compiler binaries, SDK tools |
INCLUDE |
Headers (VC++, SDK, UCRT) |
LIB |
Libraries for linking |
LIBPATH |
Assembly references |
VCToolsInstallDir |
VC++ toolset path |
WindowsSdkDir |
Windows SDK path |
UCRTVersion |
Universal CRT version |
MIT