That’s not really a fair comparison. This code is installing Go where as you’re assuming Rust is already installed in your example.
Plus I’ve had way more issues with Rust versions than I have with Go.
Ultimately though this all just a very small part of writing code in either language.