๐Ÿšง We're currently under maintenance โ€” some features may be unavailable. Thanks for your patience!

rustcliopen-source

Naveen Bandara ยท April 5, 2026 ยท 8 min read

Our Node.js CLI was slow and memory-hungry. Here's why we rewrote it in Rust, the challenges we faced, and the results.

The Problem

Our community CLI tool โ€” used for scaffolding projects and managing contributions โ€” was written in Node.js. It worked, but it was slow to start (2-3 seconds cold start) and ate 150MB of RAM for basic operations.

Why Rust?

  • **Performance**: Near-instant startup, minimal memory usage
  • **Reliability**: If it compiles, it (usually) works
  • **Distribution**: Single binary, no runtime dependencies
  • **Learning**: We wanted to learn Rust as a community

The Rewrite

We spent 3 weekends rewriting the core functionality. The hardest parts were:

  1. **Async HTTP**: Moving from fetch/axios to reqwest
  2. **Error handling**: Rust's Result type forced us to handle every edge case
  3. **CLI parsing**: clap is amazing but has a learning curve

Results

  • Cold start: 2.3s โ†’ 15ms (150x faster)
  • Memory: 150MB โ†’ 3MB (50x less)
  • Binary size: 8MB (vs 80MB node_modules)
  • Zero runtime dependencies for end users

Lessons Learned

Start with a small scope. We only ported the 3 most-used commands first, then iterated. Trying to port everything at once would have killed the project.