Skip to main content

Crate protoc_gen_rust_temporal

Crate protoc_gen_rust_temporal 

Source
Expand description

protoc-gen-rust-temporal library entry point.

The binary in main.rs is a thin stdin/stdout shell; the actual CodeGeneratorRequest -> CodeGeneratorResponse pipeline lives here so tests (and the eventual golden harness) can exercise it without spawning a subprocess.

Phase 0 ships only the plumbing: run_with_pool accepts a descriptor pool that already has temporal.v1.* extensions attached (per main.rs’s descriptor-pool extraction trick), plus the set of files the caller asked the plugin to generate. Phase 1 wires up parse → validate → render.

Modules§

model
Internal representation produced by parse.rs and consumed by render.rs.
parse
DescriptorPool -> Vec<ServiceModel> extraction.
render
ServiceModel -> Rust source emission.
temporal
Generated prost types for cludden’s temporal.v1.* annotation schema and the transitively-referenced temporal.api.enums.v1 enums. The parser uses prost-reflect against the descriptor pool, but these types are exposed for downstream introspection (e.g. tests round-tripping options).
validate
Cross-method invariants applied after parse.rs builds a ServiceModel.

Functions§

run_with_pool
Run the plugin pipeline against a fully-populated descriptor pool.