SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation workspace -> Cargo packages

Rust project

Rust generation creates a Cargo workspace whose services and contracts also build independently.

When to use

Use this reference when generating, reviewing or operating a Service Architect project.

Behavior

  • Each service and referenced Module has its own Cargo.toml.
  • src/main.rs starts the service and src/lib.rs exposes package code.
  • src/internal/app contains generated ServiceLib graph wiring.
  • src/internal/functions contains business implementations and tests.
  • Public types are emitted below <Module.name>/src/types when Type.module selects that Module.
  • Modules selected by HTTP connectors include generate-openapi.generated.sh and generated transport modules.

Rust service directories

Important paths in each generated Rust service.

PathOwnershipDescription
Cargo.tomlManaged

Standalone crate metadata and locked dependencies.

src/main.rsPreserved entrypoint

Starts the service executable.

src/lib.rsManaged

Exports the service crate.

src/internal/app/Generated

Runtime graph and transport assembly.

src/internal/functions/Preserved

Business stream functions and endpoint handlers.

src/internal/config/Mixed

Generated configuration model and extensions.

src/internal/types/Mixed

Service-local Rust contracts.

generate-openapi.generated.shGenerated when needed

Pinned OpenAPI transport binding generation.

Rust service tree

<service-name>/
  Cargo.toml
  src/main.rs + src/lib.rs
  src/internal/app/
  src/internal/functions/
  src/internal/config/ + types/
  config/ + graph/ + docs/
  grafana/ + helm/