Expand description
Rust client bindings for Microsoft Orleans services via an official .NET gRPC bridge.
This crate provides an ergonomic, async Rust API for calling Orleans grains
without reimplementing Orleans’ internal gateway protocol or
serialization runtime. A small .NET bridge (see the dotnet/ directory in
the repository) hosts the official Orleans IClusterClient and exposes a
generic gRPC surface that this crate talks to.
use orleans_rust_client::{GrainKey, OrleansClient};
let client = OrleansClient::connect("http://127.0.0.1:50051").await?;
let counter = client.grain(
"Counter.Abstractions.ICounterGrain",
"counter",
GrainKey::String("demo".into()),
);
let value: i64 = counter.invoke_json("Get", &()).await?;
println!("value = {value}");Modules§
- codes
- Stable, machine-readable error codes returned by the bridge.
- pb
- Generated protobuf message types for the bridge protocol
(
orleans.bridge.v1).
Structs§
- Client
Config - Connection and per-call defaults for an
crate::OrleansClient. - Grain
Ref - A handle to a specific grain (interface + grain type + key) on which methods can be invoked.
- Orleans
Client - A cheaply-cloneable handle to an Orleans bridge.
- Orleans
Client Builder - Builder for
OrleansClientwith non-default connection settings. - RawResponse
- The raw result of an
OrleansClientinvocation: opaque payload bytes plus any response-context entries the grain produced. - Request
Context - An ordered set of string key/value pairs propagated with a grain call.
- Retry
Policy - Exponential-backoff retry configuration.
- TlsConfig
- Transport security configuration for the gRPC channel.
Enums§
- Grain
Key - The primary key used to address an Orleans grain activation.
- Orleans
Error - Errors returned by
crate::OrleansClientand grain calls.
Constants§
- DEFAULT_
TIMEOUT - Default per-call deadline applied when neither the call nor the client overrides it.