Article Complete
AIM
Ruff, the New Rust-Based Python Linter for Programmers
Ruff, the New Rust-Based Python Linter for Programmers

Ruff, the New Rust-Based Python Linter for Programmers

Although written in Rust, Ruff can be installed through pip, like other command-line tools.

Published Updated

Key takeaways

  • Ruff is a fast Python linter written in Rust, offering improved performance compared to traditional tools.
  • It supports over 200 lint rules and is already adopted by notable projects like FastAPI and Pydantic.
  • Ruff significantly reduces linting time, processing files in about 60 milliseconds, compared to much longer waits with other linters.
  • The tool features caching and file watching capabilities, making it efficient for real-time development.
  • Installation is straightforward via pip, aligning with common practices in the Python ecosystem.
5 min

Former Spring Discovery and Khan Academy staff engineer Charlie Marsh recently released the latest version of ‘Ruff’, a  fast Python linter written in Rust.

Ruff can support over 200 lint rules and is now being used in big open-source projects such as FastAPI, Bokeh, Zulip, and Pydantic. 

In comparison to Flake8, Ruff is approximately 150 times faster on macOS, 75 times faster than pycodestyle, and 50 times faster than pyflakes and pylint, among others.

The difference between receiving real-time feedback (roughly 300 and 500 milliseconds) and waiting for 12 or more seconds is 25 times, at least. With a 150-times speed increase, the difference becomes a mere 300–500 milliseconds compared to 75 seconds. Ruff's total processing time for a single file in CPython is about 60 milliseconds, making it faster. 

Ruff employs RustPython's AST parser and implements its own AST traversal, visitor abstraction, and lint-rule logic. In addition, it supports Python 3.10, consisting of the new pattern-matching syntax.

Ruff can be installed through pip, like other command-line tools.

Like ESLint, Ruff enables caching, allowing single-file code linting and CPython codebase linting in 60 ms. Ruff also includes file watching similar to TypeScript, making it a persistent linter that restarts when the source code is altered. Ruff supports pyproject.toml-based setup, which is becoming more popular in the Python community.

Advertisement

Order the latest Book by Dinesh Pundri

[Update: 16 February 2023 15:32 | Previously, the headline erroneously mentioned that Ruff is a programming language instead of Python Linter. The headline has now been updated to reflect the changes.]

Membership

Stay ahead with AI insights.

Unlimited access to premium articles, exclusive analysis, and the stories shaping India's AI economy.

Subscribe now

AIM Americas

1190 Miraloma Way Suite P, Sunnyvale, CA 94085

AIM India

1st Floor, Sakti Statesman, Bellandur, Bengaluru – 560103

© 2026 AIM. All rights reserved.