pub trait RuntimeAdapter: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn has_shell_access(&self) -> bool;
fn has_filesystem_access(&self) -> bool;
fn storage_path(&self) -> PathBuf;
fn supports_long_running(&self) -> bool;
fn build_shell_command(
&self,
command: &str,
workspace_dir: &Path,
) -> Result<Command>;
// Provided method
fn memory_budget(&self) -> u64 { ... }
}Expand description
Runtime adapter — abstracts platform differences so the same agent code runs on native, Docker, Cloudflare Workers, Raspberry Pi, etc.
Required Methods§
Sourcefn has_shell_access(&self) -> bool
fn has_shell_access(&self) -> bool
Whether this runtime supports shell access
Sourcefn has_filesystem_access(&self) -> bool
fn has_filesystem_access(&self) -> bool
Whether this runtime supports filesystem access
Sourcefn storage_path(&self) -> PathBuf
fn storage_path(&self) -> PathBuf
Base storage path for this runtime
Sourcefn supports_long_running(&self) -> bool
fn supports_long_running(&self) -> bool
Whether long-running processes (gateway, heartbeat) are supported
Provided Methods§
Sourcefn memory_budget(&self) -> u64
fn memory_budget(&self) -> u64
Maximum memory budget in bytes (0 = unlimited)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".