protoc-gen-rust-temporal
A protoc plugin that reads
cludden/protoc-gen-go-temporal
annotations (temporal.v1.*) from a proto service definition and emits a
typed Rust Temporal client.
Status: Phase 0 / bootstrap. The repo carries the scaffolding, vendored annotation schema, and wire-format spec. Code-emission is wired in later phases — see
SPEC.mdfor the delivery plan.
What it does
Given a service annotated for the Go plugin —
service JobService {
rpc RunJob(JobInput) returns (JobOutput) {
option (temporal.v1.workflow) = {
task_queue: "jobs"
id: "{{ .name }}"
};
}
}
— protoc-gen-rust-temporal generates a JobServiceClient exposing a typed
run_job method returning a RunJobHandle, plus signal/query/update methods
mirroring the proto. The intended sibling is
protoc-gen-ts-temporal,
so one annotated proto produces Go, TS, and Rust clients with zero proto
changes.
Quickstart (Phase 4)
# buf.gen.yaml
version: v2
plugins:
- remote: buf.build/nu-sync/rust-temporal
out: src/gen
Or install locally:
# buf.gen.yaml
plugins:
- local: protoc-gen-rust-temporal
out: src/gen
Add the runtime helper to your crate's Cargo.toml:
[]
= "0.0"
Wire format
Generated clients speak binary/protobuf end-to-end. See
WIRE-FORMAT.md for the contract; the sibling TS plugin
keeps a byte-identical mirror.
Layout
| Crate / file | Role |
|---|---|
crates/protoc-gen-rust-temporal/ |
The plugin binary + library. |
crates/temporal-proto-runtime/ |
TypedProtoMessage<T> runtime helper used by generated code. |
proto/temporal/v1/temporal.proto |
Vendored copy of cludden's annotation schema. |
SPEC.md |
Design spec + phased delivery plan. |
WIRE-FORMAT.md |
Pinned wire-format contract. |
docs/sdk-shape.md |
Pinned reference for temporalio-sdk 0.4 quirks. |
License
MIT. See LICENSE.