Skip to content
Python Integration Alpha

Auto × Python

AutoVM can now call Python code directly. a2py transpiles Auto to Python. Bridge the gap between systems programming and the Python ecosystem.

Python Ecosystem Access

Direct
VM Calls
Call Python code directly from AutoVM.
a2py
Transpiler
Auto → Python with idiomatic output.
PyO3
FFI
Rust-Python interop powered by PyO3.
AI/ML
Target
PyTorch, NumPy, and the Python AI stack.
Interop

Call Python from AutoVM

AutoVM now has first-class Python interoperability. Import Python modules and call them as if they were native Auto code.

  • Direct Python calls — use.py imports Python modules
  • Auto-type marshalling — automatic conversion between Auto and Python types
  • REPL Python FFI — experiment interactively
  • Multi-type support — scalars, collections, and custom objects
ai_script.at
use.py math: sqrt, pi
fn main() {
    print(sqrt(2.0))
    print(pi)
}
Transpilation

a2py Transpiler

Compile Auto to Python. Generate idiomatic Python code from your Auto source.

  • Idiomatic output — Pythonic method mapping and static methods
  • use → import — module system translation
  • @dataclass — Auto structs become Python dataclasses
  • Struct destructuring — pattern matching support
  • Two-phase emit — clean, readable Python output
a2py output
# Auto source
struct Point { x: float, y: float }
# Generated Python
@dataclass
class Point:
    x: float
    y: float
Roadmap

Road to Full Parity

Python support is Alpha today. The roadmap targets full ecosystem access.

  • v0.5 (now) — AutoVM calls most Python code; a2py transpiles basic programs
  • v0.6 — Call any Python code; PyTorch and common AI environments
  • Future — Skip Python glue, call underlying C/C++ directly for performance
v0.5Alpha
v0.6Beta
FutureStable

Why Auto + Python?

🧠

AI/ML Ecosystem

Access PyTorch, NumPy, Pandas, and the entire Python AI stack from Auto.

🔄

Dual Workflow

Script in AutoVM with Python interop, then transpile to Python for deployment.

⚡

Performance Path

Future: bypass Python glue and call C/C++ extensions directly.

📊

Data Science

Combine Auto's type safety with Python's data ecosystem.

🔧

PyO3 Powered

Rust-grade FFI performance for Python interop.

🌉

Bridge

Move between systems programming and scripting without switching languages.

Explore Auto + Python

Read the parity roadmap, run the conformance tests, or try Python interop in the Playground.

Released under the MIT License.