Skip to main content

Crate tpt_telos_codegen

Crate tpt_telos_codegen 

Source
Expand description

Rust backend code generation for tpt-telos (Phase 2 milestone).

generate_program lowers a set of parsed modules into a single, self-contained Rust library source string. The generated code:

  • declares a struct for every user type that is accessed by field,
  • attaches an invariants() method to each such struct for every invariant block of the same name,
  • emits one fn per func, threading &mut only to parameters that are actually mutated,
  • carries the original requires / ensures contracts as doc-comments.

The function bodies come from the agentic transpiler’s final candidates (see tpt_telos_agent), so the emitted code is mathematically verified before it is written out.

Re-exports§

pub use project::generate_project;
pub use project::GeneratedFile;
pub use project::Project;

Modules§

eject
The “eject” hatch for tpt-telos (Phase 4).
ffi
Automatic FFI bridge generation for tpt-telos (Phase 3).
go
Go backend code generation for tpt-telos (Phase 3).
project
Dual-backend project assembly for tpt-telos (Phase 3).
proof
Cryptographic proof manifest for tpt-telos.
python
Python (with optional JAX) backend for tpt-telos.

Functions§

generate_program
Generate a full Rust library source for all modules.