I haven't used IDE for a while and today, when i opened to do something, it was throwing me multiple errors. Error 1 : error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context The rust-analyzer invokes the command cargo metadata with the flag --filter-platform. This flag was added in Rust 1.41.0. The older versions will give the following error. C:/.cargo/bin/cargo.exe metadata --verbose --format-version 1 --all-features --filter-platform x86_64-pc-windows-msvc stdout : error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context Error 2 : Another error was Fetching Cargo Config failed. Execution failed (exit code 101). C:/.cargo/bin/cargo.exe -Z unstable-options config get stdout : stderr : error: no such subcommand: `config` Error 3 : Rust 1.39.0 which is no longer supported. It may lead to unexpected errors. Consider upgrading your toolchain to at least 1.56.0 Solution is to
While compiling Rust program in a windows environment, you may encounter the error : linker `link.exe` not found. This is because of the absence of the C++ build tools in your machine. For compiling Rust programs successfully, one of the prerequisites is the installation of the Build Tools for Visual Studio 2019.
After the download, while installing the Build tools, make sure that you install the required components (highlighted in Yellow)
This will download around 1.2GB of required files. Once everything is successfully installed, reboot and re-run your rust program and it will compile successfully.
Read More on RUST