I've got VisualStudio 2026, I've also tried to install BuildTools separately. I can manually locate link.exe.
Alas, rustc can not. I'm honestly out of my depth with windows. Do I need a specific, non-latest version of buildtools?
I've got VisualStudio 2026, I've also tried to install BuildTools separately. I can manually locate link.exe.
Alas, rustc can not. I'm honestly out of my depth with windows. Do I need a specific, non-latest version of buildtools?
I think that depends on find-msvc-tools, whose changelog says it gained 2026 support in 0.1.5, and that only made it to Rust 1.93 in rust#148831. You may also need to update it in your dependencies, especially as a dependency of cc for *-sys crates.
$ rustc --version
rustc 1.95.0-nightly (de6d33c03 2026-01-28)
Well that's probably not it then?
Okay, so the problem, it turns out, was that I absolutely needed not just buildtools, but the Windows 11 SDK component as well. Which is, uh, interesting, considering I'm not on WIndows 11.
Probably I am only one Rust Windows user who didn't encounter any problem with Rust and didn't install anything extra, just stock Windows 11. Luckily, I do only Rust development and know nothing about C++ and other Microsoft tools.
Hmm, closest I could find is:
MSVC builds of
rustupadditionally require an installation of Visual Studio 2019 or the Visual C++ Build Tools 2019. For Visual Studio, make sure to check the “C++ tools” and “Windows 10 SDK” option.
On Other installation methods - The rustup book
That's seemingly referring to dependencies of rustup.exe itself if you're manually installing it, so that's confusing.
The page was moved from the rust forge and that part hasn't been updated in awhile. It needs a bit of a rewrite to update and fit in with the rustup docs.
The more accurate information can be had in MSVC prerequisites - The rustup book (but it too could use some updating since VS 2026).
You can install the Windows 10 SDK if you like. It really doesn't matter. The newest version of the API can be used to compile for the oldest version of Windows we support.
You can choose a specific older version of build tools, but Windows 11 is the only SDK option in the VS Installer.
It's all very confusing and requires entirely too much mousing around in oddly structured menus. And the error from rustc is not very helpful either - calling out that link.exe can't be located, when it is actually present on the system, and it's a different component that's missing.
It's probably mostly on M$ though. Entirely unclear why they don't let you winget the individual components.
IIRC, the SDK version is about what you want to target, not necessarily what your host platform is running. Also, the SDK's are backwards compatible, as long as you don't use anything that's actually Windows 11 only.
nods
Microsoft Build Tools are part of Visual Studio: The software is licensed as a supplement to Visual Studio Community, Visual Studio Professional, and Visual Studio Enterprise (collectively, “Visual Studio Products”). Use of the software requires a valid license to one of the Visual Studio Products.
It would be confusing to provide it via winget and may even create an idea that one doesn't need license for the Visual Studio to use these tools.
P.S. Actually 2026 version have an additional permission for the use of Build Tools for the compilation of open source software. Nice touch. This definitely covers rustc, but may or may not cover other rust users.
It unfortunately does not cover rustc (see subsection (e)). You can develop, say, a python or nodejs project that uses some rust code as a dependency without having a Visual Studio license. But you can't develop rust software itself beyond "minor modifications" such as fixing typos.