I have been using the Microsoft C/C++ VS Code extension and have installed the Visual Studio C/C++ SDK tools on Windows 10/11, all to run Rust source code debugging for last 3+ years.
On Linux (Ubuntu) I use CodeLLDB to do the same.
I do not use C or C++, I program exclusively in Rust only.
My question is this: using the most current versions of Rust (1.71+) on Windows 11 can I use CodeLLDB extension on both Windows 11 and also on Ubuntu Linux ?
So that I can remove the Microsoft C/C++ SDK tools and remove the C++ VS Code extension from Windows 11?
thank you very much in advance
CodeLLDB does work in VS Code on Windows.
You should note, however, that you need to use the
x86_64-pc-windows-gnu target platform if you want to uninstall all the Microsoft C/C++ SDK tools. Rust still needs things like the Microsoft linker when using the
thank you very much!
It looks like I just need to install a different Rust target toolchain on Windows 11, not the default MSVC target I have been using for last 3-4 years.
Do I also need to install LLVM or LLDB or any other GNU or compiler/linker/debugger components on Windows 11 to make it all work?
Will the x86_64-pc-windows-gnu target be as stable and as performant as the x86_64-pc-windows-msvc target, on Windows 10/11?
In other words will I likely regret the switch from MSVC to GNU ? 8^) LOL
You should be able to install the GNU toolchain and uninstall the MSVC toolchain directly with your current Rustup, at least:
rustup toolchain install stable-gnu
rustup toolchain uninstall stable-msvc
and you don’t need any other tools.
The main visible differences are the debug format, and that you’re linking against
MSVCRT.DLL and Microsoft would rather you didn’t.
x86_64-pc-windows-gnullvm fixes this and in general is a much more "modern" target than
windows-gnu. Unfortunately it's still tier 3 so it's not distributed by rustup yet. Hopefully it will reach tier 2 soon.
We are also creeping closer to a "native windows" target with raw-dylib hitting stable. (Which reminds me, I should take another stab at that now)
thank you everyone.
So would it be fair to say that for now (current versions of Rust, 1.71) on Windows 10/11 it is best to remain on the default Windows Rust target toolchain rather than the switching to gnu, gnullvm and other alternatives?
I would say, use the one that's easiest for you to debug while developing, and use MSVC for now if you're going to distribute anything as an executable.