ODK

Rust path

Scaffold an OMS Service with cargo-generate

The Rust template produces a checklist-ready OMS Service: ServiceStatus heartbeats, status data requests, BIT hooks, a Service Contract generator, Helm, and cucumber-uci conformance wired as a SUT sidecar. You replace the example body; you do not invent the lifecycle.

Day one

Generate, then run

1

Install the generators

You need Rust (rustup), cargo install cargo-generate, and Git access to the template. Pin a tag so the scaffold is reproducible.

2

Generate against v1.0.0

SSH works if you have keys; HTTPS is shown here. Use the same value for --name and the service_name prompt.

generate
cargo generate \
    --git https://gitlab.com/stator-open-labs/oms-developer-kit/service-template-rust.git \
    --tag v1.0.0 \
    --name my-service
3

Build, contract, test, run

Local cargo run uses in-memory transport. OWP evidence is the GitLab SUT path, just dev-bus, and Helm.

after generate
cd my-service
cargo build && just contract && cargo test && cargo run

Prompts

What cargo-generate asks

PromptNotes
service_nameCrate and binary name; same as --name
service_kindService | Subsystem | Isolator (default Service)
capability_namePascalCase label for the Service Contract
organizationOwning org string
classificationUNCLASSIFIED | CUI | SECRET | TOP_SECRET
platform_crates_versionGit tag, default v1.0.0
pipelines_oms_versionCI component pin, default 1.0.0
oms_schema_versionDefault 002.5.0
cucumber_uci_versionHarness image tag
gitlab_namespaceGroup path without the project name

What you get

A service repo, not a library

  • HeartbeatService example and config.yaml with contract seed
  • Dockerfile, Helm chart with OWP defaults, justfile
  • GitLab CI that includes pipelines-oms oms-service with SUT wiring and registry publish on semver tags
  • Baseline features under features/oms-compliance/

Default platform pin is platform-crates v1.0.0. Cargo fetch of git deps needs GitLab credentials. Formal OACWG assessment remains author work after generate.

Prefer Python? Start with Copier. Template project: Service-Template-Rust.