Astral Releases Rust-Based Python Type Checker ty 1.0
AI coding
Astral has officially released ty 1.0, a Python static type checker built in Rust that supports command-line execution and real-time editor feedback. ty has become the default type checker across OpenAI, covering millions of lines of code. Astral reported that OpenAI saw median type checking speeds increase to 24 times faster, while peak memory usage dropped by 73%. The 1.0 release introduces an enhanced generic solver and native support for libraries such as Pydantic and Django.
Astral has released ty 1.0, a static type checker for Python developed in Rust. The tool runs checks from the command line and provides real-time diagnostics within code editors. It is currently deployed as the default Python type checker across OpenAI, analyzing millions of lines of mission-critical code. According to Astral, OpenAI experienced a 24-fold increase in median type-checking speed and a 73% reduction in peak memory consumption after adopting ty. OpenAI previously announced plans in March to acquire Astral, intending to integrate its tooling into the Codex development environment once the transaction closes. In benchmarks conducted by Astral on an Apple M3 Max across 18 Python projects, ty recorded the fastest command-line checking speed in 16 projects, averaging 1.46 times the speed of Pyrefly and 3.56 times that of Zuban. In editor diagnostic update tests, ty's refresh rate reached 7.73 times that of Pyrefly and 3.22 times that of Zuban. In terms of features, ty 1.0 introduces a new generic solver and bidirectional type inference, alongside built-in support for libraries including Pydantic, Django, pytest, and attrs. In compliance test suite evaluations, false positives and false negatives decreased to 14 and 13 respectively. The tool also supports baseline snapshot comparisons for CI pipelines and can be installed via uv or VS Code extensions.
Key takeaways
- Astral released ty 1.0 built in Rust; OpenAI's internal adoption resulted in 24x median checking speeds and a 73% drop in peak memory.
- Benchmarks across 18 projects showed ty achieving the fastest CLI speeds in 16 cases and significantly faster editor diagnostic updates.
- Version 1.0 introduces a new generic solver, bidirectional type inference, and native support for Pydantic, Django, and pytest.
- The tool allows baseline snapshots for CI change tracking and is available for production deployment via uv or VS Code extensions.
Source:iThome Read the original ↗
Prepared, checked and automatically published by AI; not individually reviewed by a human. Translation checked by AI.