π Python β Native code in each target language
- π Transpiles to C++, Rust, Go, Java, TS, and many more
- π§© Preserves the original program structure almost as-is
- β‘ Generates high-performance code even when you write in Python
- β¨ Uses a simple Python subset
- π Works with existing tools such as VS Code
- π§ The core is also written in Python, so it is easy to extend
- π Supports self-hosting
These are execution times for sample programs written in Python and for their transpiled source code. Unit: seconds. In the table, Python is the original implementation and PyPy is included as a reference.
| No. | Workload | ||||||
|---|---|---|---|---|---|---|---|
| 06 | Julia-set parameter sweep (GIF) | 9.627 | 0.507 | 0.546 | 0.407 | 0.329 | 0.626 |
| 16 | Chaotic rotation of a glass sculpture (GIF) | 6.847 | 0.606 | 0.277 | 0.246 | 1.220 | 0.650 |
Full data for all languages and all samples: Sample page
Sample code: 06_julia_parameter_sweep.py
|
Sample code: 16_glass_sculpture_chaos.py
|
| Aspect | Python | Pytra |
|---|---|---|
| Execution | Runs on the Python interpreter | Runs in each backend language |
| Integers | Arbitrary precision | int64, uint64, ..., int8, uint8 |
| Floating point | 64-bit | 64-bit / 32-bit |
| Runtime speed | x1 | x10 to x100 when transpiled to C++ or Rust |
| Backend optimization | Limited | Extensive |
| Multi-language deployment | β | β |
| Typing | Dynamic typing | Static typing |
| Bounds checks | Always enabled | Customizable |
| Platform integration | Python-centric | Fits each language's SDKs and tools |
| Distribution | Requires Python runtime | Uses each language's native distribution model |
| Multiple inheritance | β | β, single inheritance only |
| Mix-ins | β | β |
| Self-hosting | β | β |
β This project is still under active development and may be far from practical use. Review the sample code and use it at your own risk.
- Japanese tutorial: docs/ja/tutorial/README.md
- Architecture: docs/ja/tutorial/architecture.md - an overview of the pipeline
- Japanese document index: docs/ja/index.md
- English tutorial: docs/en/tutorial/how-to-use.md
- English document index: docs/en/index.md
2026-03-26 - Pipeline redesign completed. All six stages of the pipeline (
parse -> resolve -> compile -> optimize -> link -> emit) now work end to end. The Go backend has been migrated to the new pipeline.
2026-03-25 - All P0 tasks completed. Reorganized the
test/directory. Go emitter and runtime reached parity on all 18 samples.
2026-03-24 - Started the pipeline redesign. Added
toolchain2/, implementedpytra-cli2, and defined the EAST1/EAST2 specifications.
Full history: docs/en/changelog.md
Apache License 2.0


