docs.rs failed to build msvc-kit-0.1.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
msvc-kit
A portable MSVC Build Tools installer and manager for Rust/Windows.
TL;DR
# Install the CLI
# Download latest MSVC + Windows SDK into default data dir
# Apply environment to current shell (PowerShell)
|
Features
- Download MSVC compiler from Microsoft servers
- Download Windows SDK to a chosen directory
- Auto environment setup for immediate use (cc-rs compatible)
- Version management for host/target architectures (x64, x86, arm64, arm)
- Library API for programmatic usage
- Resumable downloads with redb-based index for fast skip
- Manifest caching with ETag/Last-Modified conditional requests
- Multi-format extraction (VSIX, MSI, CAB)
- Hash verification with SHA256
Installation
- Via Winget (Recommended)
winget install loonghao.msvc-kit - Via PowerShell Script
irm https://github.com/loonghao/msvc-kit/releases/latest/download/install.ps1 | iex - From crates.io
- Pre-built Binaries
# Download and extract to a directory in your PATH Invoke-WebRequest -Uri "https://github.com/loonghao/msvc-kit/releases/latest/download/msvc-kit-x86_64-pc-windows-msvc.zip" -OutFile msvc-kit.zip Expand-Archive msvc-kit.zip -DestinationPath $env:USERPROFILE\.cargo\bin -Force - From source
Quick Start (CLI)
Download
# Latest versions
# Specify versions / dirs / arch
# Download only MSVC (skip SDK)
# Download only SDK (skip MSVC)
# Control parallel downloads (default: 4)
# Skip hash verification
Setup Environment
# Generate script for current shell
|
# Or for CMD
&&
# Or for Bash/WSL
# Persist to Windows registry (requires admin)
List Versions
Clean Up
Configuration
Config file: %LOCALAPPDATA%\loonghao\msvc-kit\config\config.toml
Print Environment Variables
Caching & Progress
| Cache Type | Location | Description |
|---|---|---|
| Download index | downloads/{msvc|sdk}/.../index.db |
redb database for tracking download status |
| Manifest cache | cache/manifests/ |
Cached VS manifests with ETag/Last-Modified |
| Extraction markers | .msvc-kit-extracted/ |
Skip already-extracted packages |
- Progress display: Single-line spinner by default. Set
MSVC_KIT_INNER_PROGRESS=1for detailed file progress. - Skip logic: Downloads are skipped when:
cached: File exists in index with matching hash304: Server returns Not Modified (ETag/Last-Modified match)size match: File size matches expected (best-effort, noted in code)
Library Usage
[]
= "0.1"
use ;
use Architecture;
async
Environment Variables Set
After setup_environment() or msvc-kit setup:
| Variable | Description |
|---|---|
VCINSTALLDIR |
VC install directory |
VCToolsInstallDir |
VC tools install directory |
VCToolsVersion |
VC tools version |
WindowsSdkDir |
Windows SDK directory |
WindowsSDKVersion |
Windows SDK version |
WindowsSdkBinPath |
Windows SDK bin path |
INCLUDE |
Include paths for compiler |
LIB |
Library paths for linker |
PATH |
Updated with compiler/SDK bin directories |
Platform |
Target platform (x64, x86, etc.) |
Architecture Support
| Architecture | Host | Target | Description |
|---|---|---|---|
x64 |
✓ | ✓ | 64-bit x86 |
x86 |
✓ | ✓ | 32-bit x86 |
arm64 |
✓ | ✓ | ARM64 |
arm |
- | ✓ | ARM 32-bit (target only) |
License
MIT License - see LICENSE.