Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.8 KB

FAQ.md

File metadata and controls

50 lines (34 loc) · 1.8 KB

FAQ

Why does this exist?

astral-dev-toolchain exists to give Astral more control over its development tooling, especially non-Python tooling written in compiled languages like Rust.

The basic shape of the problem is:

  • We want to depend on tools like cargo-shear;
  • But we don't want to waste CI/CD time building them;
  • And we don't want to install them on an ad-hoc basis through curl | bash and similar;
  • And we don't want to trust (most) third parties to rebuild for us.

Consequently, we need a way to reliably install our own binary builds. And fortunately for us, uv is very good at installing binaries, as long as they are shaped like Python wheels.

How does it work?

astral-dev-toolchain wraps maturin for Rust tools and radlermass for CGO-disabled Go tools to package their binary builds as Python wheels.

Under the hood there are three main parts:

  • A "bootstrap" image (astral-dev-toolchain-bootstrap), which contains the Rust and Go compilers, cross-compilation targets, and SDKs.
  • A "zygote" image (astral-dev-toolchain-zygote), which includes maturin, radlermass, and the Zig toolchain (which maturin uses for cross builds).
  • A "host" tool (astral-dev-toolchain), which is responsible for executing the "zygote" image and sending it toolchain definitions (as build.toml).

Who is this for?

Two audiences:

  • Members of Astral's development team;
  • Open source contributors working on Astral's tools.

If you aren't in one of these audiences, this toolchain is probably not for you. We make no representations about its stability, suitability, etc. outside of our specific use case.