Why We Chose Rust for the Qlty CLI

Feb 6, 2025

Bryan Helmkamp

4 min read

When building the Qlty CLI, we needed a programming language to provide a top-tier CLI experience for our users while enabling us to ship quickly and confidently. After evaluating various options, we chose Rust because it met these needs exceptionally well. Here’s why.

Performance and reliability

We’ll start with the most significant benefit. Performance and reliability are non-negotiable when building workflow-integrated developer tools, and Rust delivers on both fronts. Its fearless concurrency model enables efficient parallel processing without the risk of data races, making it an ideal choice for handling large-scale code analysis and automation tasks.

Rust also offers runtime performance that rivals C and C++, ensuring the Qlty CLI remains fast and responsive. Unlike garbage-collected languages, Rust enforces memory safety at compile time, reducing crashes and memory leaks while maintaining efficiency.

Static typing and safety

In a production environment, static typing with type inference offers significant advantages over dynamic typing. Rust’s strong type system helps prevent entire classes of bugs at compile time, reducing runtime errors and improving code maintainability.

This trend toward static typing is evident in the industry—JavaScript has TypeScript, and companies like Stripe and Shopify use Sorbet to add type safety to Ruby. Rust takes this further by eliminating null pointer errors with its Option type and replacing exceptions with Result, making error handling explicit and predictable.

Additionally, AI-powered tools thrive in statically typed environments, as clear type definitions improve code comprehension, refactoring, and automated reasoning about code correctness.

Portability and packaging

Rust produces single, self-contained binaries for all our target platforms, eliminating runtime dependencies and simplifying deployment. This cross-platform support ensures developers can easily install and start using our CLI regardless of their operating system.

With only a modest amount of extra effort, we were able to ship the Qlty CLI with native support for Windows, macOS, and Linux early on. Moreover, Users can try Qlty without dealing with cumbersome setup processes or missing libraries, making onboarding smooth and frictionless.

A rich ecosystem

Rust’s robust ecosystem played a crucial role in our decision. The language’s package manager, Cargo, and its extensive library repository, crates.io, provide high-quality libraries that accelerate development. For instance:

  • Tree-Sitter: Offers deep static code analysis capabilities, which are essential for a tool like Qlty.

  • Clap: Enables elegant and efficient command-line argument parsing.

  • Serde: Facilitates powerful and flexible data (de-)serialization for JSON and YAML.

  • Insta: Snapshot-based testing

Rust also includes built-in tools, including Clippy, rustfmt, and rust-analyzer, that perfectly align with our focus on code quality. By choosing Rust, we embraced a language that inherently values code quality—just like we do at Qlty.

Fast and integrated automated testing

Automated testing is built into Rust as a first-class feature and is a joy to use. Rust allows you to write tests directly into code files in a mod test {} block, which are not compiled into the production binary. This subtle benefit of co-locating unit tests with their code under test helps to stay in flow. Aside from Insta for snapshot testing, we’ve found everything we need for our unit, and integration tests are available out of the box.

Also, because Rust is fast in production and offers fearless concurrency, we can run our tests concurrently at lightning speed without the flakiness that often creeps into test suites. Most of our team was learning Rust as we built the Qlty CLI, and we can maintain near 100% code coverage without much overhead.

Bottom line: Rust helps us build better tools for you

Rust provides an optimal balance of performance, safety, portability, and ecosystem support, making it the perfect choice for building the Qlty CLI. By leveraging Rust’s strengths, we ensure that developers using Qlty experience a fast, reliable, and high-quality tool—just as they should expect from any developer productivity software.

If you’re building a CLI or a developer tool, we highly recommend exploring Rust. The benefits are well worth it.

Written by

Bryan Helmkamp

CEO, Qlty Software

Code quality and coverage done right

© 2025 Qlty Software Inc.

Code quality and coverage done right

© 2025 Qlty Software Inc.

Code quality and coverage done right

© 2025 Qlty Software Inc.