Skip to main content

Module render

Module render 

Source
Expand description

ServiceModel -> Rust source emission.

Output shape (<package>_<service>_temporal module):

  • One <RPC>_WORKFLOW_NAME constant per workflow.
  • One <Service>Client struct holding a temporal_runtime::TemporalClient, plus one <rpc>(input, opts) -> <Workflow>Handle start method and one <rpc>_handle(workflow_id) attach method per workflow.
  • One <Workflow>StartOptions per workflow.
  • One <Workflow>Handle per workflow, exposing only the signals, queries, and updates wired in via WorkflowOptions.{signal,query,update}.
  • One <signal>_with_start / <update>_with_start free function per start-flagged ref.

Generated code refers to runtime helpers via crate::temporal_runtime::* — the consumer crate provides that module. This mirrors the PoC’s wiring and lets the plugin stay agnostic to whichever Temporal SDK shape the consumer pins.

Functions§

render
Render the <package>_<service>_temporal.rs source for one service.