Early Explorations of Astral's Red Knot Type Checker

Early Explorations of Astral's Red Knot Type Checker

April 3, 2025
ℹ️
Red Knot continues Astral’s pattern of developing high-performance Python tooling in Rust, following the success of Ruff for linting/formatting and uv for package management.

A recent blog post by Michael Jurasovic provides an interesting early peek at Astral’s upcoming static type checker, Red Knot. While still under active development with an alpha release targeted for PyCon 2025, this in-development tool shows impressive potential.

Key Findings from the Exploration

  • Build Process: The author used Claude to analyze the Ruff codebase and successfully compiled Red Knot from source using Cargo
  • Configuration: Red Knot uses a [tool.knot] section in pyproject.toml for configuration
  • Performance: Initial benchmarks showed Red Knot running approximately 100x faster than mypy on cold starts
  • Stability: As expected for pre-release software, there were some crashes on larger codebases (SQLAlchemy, mypy) and numerous errors on others

Despite limitations, the extraordinary speed improvements over mypy make Red Knot a project worth watching closely as it develops toward its alpha release.

Last updated on

Please submit corrections and feedback...