Skip to main content

Module generator

Module generator 

Source
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 assignments
  • translate — statement/body translation (AST walk)
  • render — PyO3 function + lib.rs + Cargo.toml rendering

§Entry points

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.