Hello peoples
So I'm using WSL for my development, but I was wondering if there was a way to get cargo to run in windows while still configuring everything in my WSL files. I'm using WSL2, Ubuntu 24.04.4 and Rust Rover for coding.
If this dose not make sense please tell me and I'll try my best to make more sense.
The best way to use rust in WSL is just to install rustup in WSL and use a regular Linux toolchain of rustc, cargo, etc. If you use a Windows toolchain in the WSL filesystem, it'll be a lot slower than the Linux one. Also, you would either end up with Windows executables on the WSL filesystem, or you would need to figure out cross-compilation. If you want or need to use a Windows toolchain, do it in Windows.
1 Like