Cargo is one of the main reasons to use Rust of C++. I am pretty sure there is more involved with C++ than this:
rustup target add x86_64-unknown-linux-musl cargo build --target=x86_64-unknown-linux-musl