Expand description
Generator module — public API for Python → Rust PyO3 stub generation.
§Submodules
expr— expression-to-Rust translation (pure, no I/O)infer— type inference for params and assignmentstranslate— statement/body translation (AST walk)render— PyO3 function + lib.rs + Cargo.toml rendering
§Entry points
generate— standard generationgenerate_ml— ML mode (numpy → PyReadonlyArray1)
Modules§
- expr
- Expression-to-Rust translation helpers.
- infer
- Type inference helpers for Python → Rust parameter and assignment types.
- render
- Rust source code rendering for generated PyO3 extensions.
- translate
- Python AST → Rust body translation.
Functions§
- generate
- Generate Rust + PyO3 stubs for the given targets.
- generate_
ml - Generate with ML mode: detects numpy imports → uses
PyReadonlyArray1<f64>params.