After installing Rust and Cargo via the following command...
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
I ran cargo build on a tiny "Hello World" Rust project and got the following error:
= note: ld: library not found for -liconv
collect2: error: ld returned 1 exit status
error: could not compile `hello_world` due to previous error
I've tried rustup self uninstall then installing Rust and Cargo via brew, but I get the same error when attempting to build.
I'm running macOS Big Sur 11.6.4.