Rust vs Go for CLI Tools: A Practical Comparison
After writing CLI tools in both Rust and Go over the last few years, here are the things that actually matter when choosing between them. Startup time Go wins. A trivial Go program starts in ~1-5ms. A trivial Rust program also starts in ~1-5ms. Both are negligible for CLI tools. (The old argument about Go’s startup was mostly about JVM-vs-Go, not Go-vs-Rust.) Binary size Out of the box: Go: 5-15 MB for a small program Rust: 2-8 MB for a small program (with LTO and strip) After aggressive optimization: ...