Rust SDK
The Rust SDK is the asynchronous gateway client used by the OpenShell CLI and
TUI. Its curated API covers common sandbox operations, while raw exposes the
generated Tonic clients for the complete RPC surface. Use the SDK and gateway
from the same OpenShell release when possible.
Install the SDK
The Rust SDK is currently consumed from source. Pin the dependency to the same release tag as your gateway:
Connect to a Gateway
ClientConfig accepts a full gateway URL. This local example uses plaintext
transport and no authentication:
For an OIDC gateway, attach a bearer token and use HTTPS:
Set ca_cert when the gateway uses a private CA. The Rust SDK supports
server-authenticated TLS and OIDC bearer authentication. It does not support
mTLS client certificates or read the CLI gateway configuration from disk.
Create and Use a Sandbox
Curated operations use the default workspace. Use
client.workspace("name") when your application targets another
workspace.
Use raw_grpc_fresh() for RPCs that the curated API does not yet wrap. The raw
client returns generated protobuf types and requires callers to assemble full
requests.
Next Steps
- Review Gateway Authentication for transport and identity choices.
- Review API Errors for the gateway error model.
- See the Rust SDK source documentation for modules and advanced transport behavior.