4
Programming Languages
Rust vs Go for a CLI tool distributed to thousands of developers
Performance ↔ Development speed
Context
We're building a developer CLI (think: code generation, local dev environment orchestration). Needs to be a single binary for macOS, Linux and Windows. Team knows Go better; a couple of engineers are keen on Rust.
RustvsGo
Community verdict
Rust 40%Go 60%
10 engineers · 2 opinions
With these constraints, what would you choose?
One choice per engineer. You can change it any time.
Rust
Go
Dev speed →
Trade-offs
Dimensions
RustGoout of 5
- Performance
- 5Rust scores 5 of 54Go scores 4 of 5
- Dev speed
- 2Rust scores 2 of 55Go scores 5 of 5
- Binary size
- 4Rust scores 4 of 5
Community discussion
2 comments
Have you made this decision in production? Share your reasoning.
Sign in to commentIf the CLI parses large files or does heavy local work, Rust's performance and error handling with
Resultare worth it. clap is also a better CLI framework than anything in Go.GOOS=windows go buildand you're done. For a CLI that mostly shells out and does I/O, Go's compile speed and simplicity win.