pyscriptc
pyscriptc
pyscriptc
Compile annotated Python to a native binary. No CPython at runtime.
Quickstart · GitHub · PyPI
What it does
- Native output: a Python file lowers to a typed IR, then to LLVM, then to a standalone binary. The result has no interpreter inside.
- Honest fences: anything the subset does not prove is a fence with a diagnostic code (
PSxxxx), not a guess. - CPython’s own parser: the front end is the
astmodule, so what parses is what CPython parses. - Cross-compile:
zig ccas the driver emits binaries for other targets via--target. - Zero runtime dependencies: the CLI itself is stdlib-only and ships the C runtime it links.
Try it now
uv tool install pyscriptc
pyscriptc compile examples/sum_squares.py --run --call sum_squares --args '[10]' -o /tmp/sum_squares
That prints 285, the same value CPython returns, from a native binary.
Read next
- Quickstart: install, compile, run.
- The Python subset: what lowers, what fences.
- Telemetry and privacy: anonymous usage metrics and how to opt out.