Skip to main content

Crate orleans_rust_codegen

Crate orleans_rust_codegen 

Source
Expand description

Manifest-driven code generation for typed orleans-rust-client grain clients.

This is intentionally limited (see the repository roadmap). It consumes a manifest emitted by the .NET bridge (GetManifest / OrleansRustBridge.Tools) and produces one Rust struct per grain contract that wraps a orleans_rust_client::GrainRef with typed methods.

Type mapping covers the common primitive .NET types plus nullable types, arrays, and the standard generic collections (List<T>Vec<T>, Dictionary<K, V>HashMap<K, V>, …); anything unrecognised falls back to serde_json::Value, keeping the generator robust against manifests it does not fully understand. Methods with multiple parameters generate multi-argument functions (serialized as a JSON array), and an opt-in mode emits <method>_with_context variants that also return the response context.

Structs§

CodegenOptions
Options controlling generation.
GrainContract
A single grain contract.
GrainMethod
A single grain method.
Manifest
A contract manifest, matching the JSON shape emitted by the bridge.
MethodParameter
A single named method parameter.

Enums§

CodegenError
Errors produced while generating client code.

Functions§

generate
Generate Rust source for every grain in manifest.