Step by step instruction to install Rust and Cargo for mingw with Msys2?

The Using Rust on Windows page you linked to dates from before rustup replaced the installer as the default option to install Rust. Installers are still available, but you should use rustup if possible, because it makes it easy to update and to use multiple toolchains at once (e.g. stable, beta and nightly). If you … Read more

rustup gives command not found error with zsh even after installing with brew

I used the following steps to install Rust on MacOS: Install Rust using: curl –proto ‘=https’ –tlsv1.2 -sSf https://sh.rustup.rs | sh Make sure that you customize the installation and answer No when it asks to modify the Path. Once successfully done, then add the Path variable to .zshrc using: To open .zshrc use nano ~/.zshrc … Read more

Can’t use `-Z macro-backtrace` unstable option with `cargo`

-Z macro-backtrace is a rustc flag, not a cargo flag. You should be able to pass it to rustc using cargo +nightly rustc — -Z macro-backtrace. (The +nightly in the command line is optional if you already switched to the nightly compiler as the default.) Alternatively, you can set the RUSTFLAGS environment variable: export RUSTFLAGS=”-Z … Read more

How to switch between Rust toolchains?

Of course the rustup default stable command works well, but the easiest way is to keep a rust-toolchain file inside your project root folder. Similar to how you’d keep a .nvm file for a Node.js project. Please note that if you use rust-toolchain.toml instead of just rust-toolchain you will need to add needed sections similar … Read more

tech