HN
Today

I Fixed Windows Native Development

Windows native development often feels like a torturous maze due to Visual Studio's monstrous installer and opaque toolchain management. This post introduces msvcup, a clever CLI tool that declutters the process, enabling fast, reproducible, and versioned C++ builds without the full IDE. The Hacker News community resonated deeply, celebrating a long-awaited solution to a pervasive pain point for Windows developers.

75
Score
23
Comments
#1
Highest Rank
10h
on Front Page
First Seen
Feb 15, 1:00 PM
Last Seen
Feb 15, 10:00 PM
Rank Over Time
1111123235

The Lowdown

Developing native applications on Windows has long been plagued by the unwieldy and non-transparent nature of the Visual Studio installer. Developers are often forced into hours-long downloads, cryptic error messages, and the constant struggle of ensuring consistent build environments across machines and for contributors.

The author, deevus, details the myriad issues:

  • Monolithic Installer: Visual Studio bundles thousands of components, making it difficult to select only what's needed for compilation, leading to massive installations.
  • Lack of Transparency & Control: The installation process is opaque, leaving developers unaware of installed files or how to manage versions, leading to registry cruft and difficult uninstalls.
  • Reproducibility Nightmare: Without proper version control for build tools, environments diverge silently, making reproducible builds a significant challenge.
  • Environmental Fragility: Command-line compilation often relies on vcvarsall.bat, a batch script that globally modifies environment variables, leading to brittle setups.

To address this, deevus developed msvcup, a small, open-source CLI program inspired by existing work. msvcup bypasses the Visual Studio Installer by parsing Microsoft's public JSON manifests, directly downloading only the necessary compiler, linker, headers, and libraries from the CDN. Key benefits include:

  • Isolated & Versioned Installs: Toolchains and SDKs are installed into separate, versioned directories, allowing side-by-side installations and easy removal.
  • Efficiency: Installs are significantly faster, taking minutes instead of hours, and are idempotent.
  • Reproducibility: Supports lock files, ensuring everyone uses the exact same packages, and provides an "Automatic Environment" for clean build setups.
  • Cross-Compilation: Simplifies setting up cross-compilation environments.

While msvcup focuses on the core compilation toolchain and doesn't replace the full Visual Studio IDE or MSBuild project systems, it offers a powerful path to modern, declarative, and portable native development workflows on Windows, making the ecosystem feel more aligned with practices common on other platforms.

The Gossip

Windows Workflow Woes Wiped

Many commenters expressed profound relief and appreciation for `msvcup`, highlighting its value as a significant quality-of-life improvement. They shared their own frustrations with the existing Visual Studio installation process, describing it as a painful and inefficient experience. The tool is seen as a major step towards making native Windows development more manageable and less daunting, especially for those who previously resorted to alternatives like MinGW.

Toolchain Takeaways & Tactical Tweaks

The discussion delved into various alternatives and related toolchain challenges. Some users pointed out the existence of LTSC (Long-Term Servicing Channel) Visual Studio Build Tools, which offer more stability but are less known or accessible to hobbyists. Others drew parallels to how other language ecosystems (like Rust's `rustup`) handle toolchain management more gracefully. There were also suggestions for future enhancements, such as adding support for `clang-cl`.

CI/CD Complexities Conquered

A significant portion of the comments focused on how `msvcup` could revolutionize Continuous Integration/Continuous Deployment (CI/CD) pipelines. Developers shared their current convoluted methods, such as extracting toolchains from GitHub Actions runners or manually maintaining release builds, emphasizing the difficulty and cost of maintaining Windows CI. The new tool offers a path to much simpler, faster, and more reproducible CI builds, potentially saving considerable time and resources.