for · rust devs

If you ship Rust services, openclaw-rs fits.

A real agent runtime — axum gateway, sled event store, sandboxed tools, encrypted credentials — that you can install with cargo and embed crate-by-crate.

What you actually get

One cargo install openclaw-cli and you have:

  • The openclaw-gateway binary serving JSON-RPC 2.0 over HTTP and WebSocket.
  • The agent runtime with platform-specific sandboxes.
  • The embedded Vue 3 dashboard at /.
  • The CLI: onboard, doctor, status, config, daemon.

If you'd rather embed

Every crate is independently usable. Pull in only what you need:

[dependencies]
openclaw-core = "0.1"
openclaw-providers = "0.1"
openclaw-agents = "0.1"

You get the types, the providers, and the agent runtime — no gateway, no dashboard, no CLI. Wire them into your own service.

The Rust ecosystem fits

  • axum + tower for the gateway. Standard middleware composition.
  • tokio for async I/O.
  • sled for the event store. Pure Rust, embedded, ACID.
  • serde for JSON-RPC and config.
  • rustls for TLS (not openssl).
  • aes-gcm + argon2 for credential encryption.
  • tracing for structured logging.
  • nng for the TypeScript plugin IPC bridge.

Compile-time guarantees

  • #![forbid(unsafe_code)] across every workspace crate.
  • No unwrap() on external input.
  • No panic!() on parse failure.
  • Exhaustive match on every Result return.

Cross-compilation

The Rust toolchain handles cross-compilation natively:

  • Linux x64: x86_64-unknown-linux-gnu
  • Linux arm64: aarch64-unknown-linux-gnu
  • macOS x64: x86_64-apple-darwin
  • macOS arm64: aarch64-apple-darwin
  • Windows x64: x86_64-pc-windows-msvc

cross makes the Linux targets even easier.

Workspace layout

The repo is a Cargo workspace with 10 crates. openclaw-core at the foundation, openclaw-gateway at the top, and the rest composable in between. See the architecture overview for the full dependency graph.

Contributing

The areas where we'd most welcome contributions:

  • Channel adapters — Discord, Slack, Signal, Matrix, WhatsApp. Telegram is the reference.
  • Provider clients — Google Gemini and Ollama, behind the existing Provider trait.
  • WASM plugin runtime — wasmtime or wasmer, behind the existing plugin API.
  • Observability — OpenTelemetry exporters on top of the tracing layer.
  • Benchmarks — we want measured numbers before making concrete performance claims.

Get it running

cargo install openclaw-cli
openclaw onboard
openclaw gateway run

Then read /architecture and pick the layer you want to depend on.