ryo-server 0.1.0

[preview] RYO Server - tarpc-based RPC server for ryo operations
Documentation

ryo-server

crates.io docs.rs License: MIT OR Apache-2.0

Status: preview. APIs may change in v0.x. Part of the ryo workspace — AST-centric Rust programming for AI agents.

ryo Server — tarpc-based RPC server. Wraps ryo-app's Api and exposes it over Unix Domain Socket using tarpc with named MessagePack serialisation. Idle-timeout auto-shutdown, optional parallel initialisation, single-mutex locking.

Install

cargo add ryo-server

Quickstart

The server is typically started by the ryo-cli connect-or-spawn pattern, but it can be embedded directly:

use ryo_server::RyoServer;
use ryo_app::Api;
use std::sync::{Arc, Mutex};

let api = Arc::new(Mutex::new(Api::new(storage)));
let server = RyoServer::new(api, &config);
server.serve_on_uds("/tmp/ryo.sock").await?;

Configuration

~/.ryo/config.toml:

[server]
idle_timeout = 3600    # seconds; 0 = never timeout
parallel_init = true   # parallel project loading on startup

Architecture

RyoServer
├── api: Arc<Mutex<Api>>           single mutex for all operations
├── shutdown_tx: Shutdown sender
└── last_activity: Atomic timestamp

  ↓ UDS + tarpc (serde_transport, MessagePack named)

Clients (ryo-cli)
└── RyoServiceClient

Status

Preview. RPC surface and codec format are likely to evolve.

License

Licensed under either of Apache-2.0 or MIT at your option.