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
# MSVC version can be short (14.44) or full (14.44.34823)
# Download only MSVC (skip SDK)
# Download only SDK (skip MSVC)
# Control parallel downloads (default: 4)
# Skip hash verification
Note: MSVC version can be specified as short format (e.g.,
14.44) which auto-resolves to the latest build, or full format (e.g.,14.44.34823) for a specific build.
Version Compatibility Quick Reference:
| Scenario | MSVC | SDK | Command |
|---|---|---|---|
| Latest (recommended) | 14.44 |
10.0.26100.0 |
msvc-kit download |
| Windows 11 development | 14.42+ |
10.0.22621.0+ |
msvc-kit download --sdk-version 10.0.22621.0 |
| Maximum Win10 compat | 14.40 |
10.0.19041.0 |
msvc-kit download --msvc-version 14.40 --sdk-version 10.0.19041.0 |
See Version Compatibility Guide for detailed information.
Setup Environment
# Generate script for current shell
|
# Or for CMD
&&
# Portable script (rewrites install root to %~dp0runtime)
# Or for Bash/WSL
# Persist to Windows registry (requires admin)
Create Portable Bundle
Create a self-contained bundle with MSVC toolchain that can be used anywhere:
# Create bundle (requires accepting Microsoft license)
# Specify output directory and architecture
# Cross-compilation bundle (x64 host targeting ARM64)
# Also create a zip archive
# Specify versions
The bundle contains:
msvc-kit.exe- CLI toolVC/Tools/MSVC/{version}/- MSVC compiler and toolsWindows Kits/10/- Windows SDKsetup.bat- CMD activation scriptsetup.ps1- PowerShell activation scriptsetup.sh- Bash/WSL activation scriptREADME.txt- Usage instructions
Usage:
# Extract and run setup script
# Now cl, link, nmake are available
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 ;
async
See Library API Documentation for full API reference.
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.
Important: Microsoft Software License Notice
The MSVC compiler and Windows SDK downloaded by this tool are property of Microsoft and subject to Microsoft Visual Studio License Terms.
- msvc-kit itself is MIT licensed
- MSVC Build Tools and Windows SDK are NOT redistributable - users must download them directly
- By using
msvc-kit downloadormsvc-kit bundle --accept-license, you agree to Microsoft's license terms - This tool automates the download process; it does not redistribute Microsoft software