Pytra
Ultimate transpiler: converts Python to C++, Rust, C#, PowerShell, JavaScript, TypeScript, Dart, Go, Java, Swift, Kotl…
Pytra
· Supported Backends ·Features
🐍 Python → native code in each target language
- 🌐 Transpiles to C++ / Rust / Go / Java / TS and many more
- 🧩 Preserves the original code structure almost entirely
- ⚡ Write in Python, generate high-performance code
- ✨ Simple Python subset input
- 🛠 Works with existing tools like VS Code out of the box
- 🔧 The transpiler itself is written in Python — easy to extend
- 🔁 Self-hosting capable — can transpile itself
Performance Comparison
Execution time of sample code written in Python versus execution time of the same code after transpilation. (Unit: seconds.) The Python column is the original code; PyPy is included for reference.
| No. | Description | ||||||
|---|---|---|---|---|---|---|---|
| 06 | Julia set parameter sweep (GIF) | 9.627 | 0.507 | 0.546 | 0.407 | 0.329 | 0.626 |
| 16 | Glass sculpture chaos rotation (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
|
Python vs C++ vs Rust vs Pytra
Legend: ✅ = Good / 🔶 = Partial / limited / ❌ = Not supported / difficult
Read the Docs
| Getting started | Tutorial | チュートリアル |
| Guide | Guides | ガイド |
| Specification | Spec index | 仕様書 |
| Progress | Project Progress | プロジェクト進捗 |
Changelog
2026-04-10 — P0-ZIG-CREXC-S4 complete. Zig / Rust exception / try / with handling fully shared via CommonRenderer hooks. Zig toolchain_ dependency eliminated (all languages now at 0). Nim / Go / Lua new fixture parity complete. Lua copy elision done.
2026-04-09 — Zig / Rust handler binding / panic / block expression helpers consolidated in CommonRenderer.
2026-04-08 — All languages lint clear (697→0). 18 languages at 10/10 PASS. C# / Go / Nim parity restored. Nim emitter string-split workaround eliminated. P0-ZIG-CREXC S1-S3 started.
2026-04-07 — Lint down to 149 / 14 languages at 10/10 PASS (697→149). PyFile abolished, IOBase hierarchy in
built_in/io.py. Emitter guide §12.7. Cross-language PyFile coupling removal.
2026-04-06 — With statement via
__enter__/__exit__protocol (CommonRenderer try/finally + hoist). 2 with fixtures added. TS/JS shim cleanup complete. Dart emitter guide compliance. JVM major progress. .east* removed from git.
2026-04-05 — containers.py
mut[T]annotations formeta.mutates_receiver. C++ method name hardcode removed. mapping.json FQCN key unification. Toolchain rename complete.
License
Apache License 2.0
more like this
Scythe
SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.
JamSoft.AvaloniaUI.Dialogs
Provides the ability to show various dialogs and child windows in a DI injectable application dialog service ready to p…


