Skip to main content

Ty: Adventures of type-checking Python in Rust

UB2.252A (Lameere) | Day 2 | 13:30 - 13:55 | Speakers: Shaygan Hooshyari

Ty: Adventures of type-checking Python in Rust
A picture of a devroom at FOSDEM 2024
Open in browser

Notes

Abstract

Ty is a fast Python type checker and language server. Ty is built with Rust, and there are a lot of interesting technical challenges involved in making it a useful tool.

Building a Python type checker is a hard task; however, the design of Ty provides a joyful developer experience for contributors. In this talk, we will look at how the Ty codebase is structured to make development simple, and what design choices make it pleasant to work on.

We will cover:

  • How Ty goes from a Python program to a diagnostic, and what parts are most important if you want to contribute.

  • Data layout and ownership model of structs in Rust.

  • Salsa solves challenge of incremental type checking across many files.

  • Tooling for tests, snapshot testing during development and type checking open source projects in CI.


Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.