Integration
Rust SDK
boxxkite-clienttalks to a control-plane over HTTP/WebSocket — either boxxkite's own hosted cloud at api.boxxkite.com (the example below uses it directly) or your own self-hosted deployment, just by swapping the URL passed to Client::new. Async-first (tokio), mirroring the same /v1/* REST API sdk-python/sdk-js wrap, with builder-pattern options structs instead of keyword arguments.
Install
[dependencies]
boxxkite-client = "0.1"
tokio = { version = "1", features = ["full"] }Quickstart
use boxxkite_client::{Client, CreateSandboxOptions, ExecOptions};
#[tokio::main]
async fn main() -> Result<(), boxxkite_client::BoxxkiteError> {
let client = Client::new("https://api.boxxkite.com", "bxk_live_...")?;
let sandbox = client
.create_sandbox(CreateSandboxOptions::new().label("demo"))
.await?;
let result = client
.exec(&sandbox.id, "python3 -c 'print(1 + 1)'", ExecOptions::new())
.await?;
println!("{}", result.stdout); // "2\n"
client.destroy_sandbox(&sandbox.id).await?;
Ok(())
}Client::new(base_url, api_key) covers the common case; use Client::builder() for a custom timeout or a preconfigured reqwest::Client. See Sandboxes for every field CreateSandboxOptions builds.
Every capability, from this client
- Sandboxes —
create_sandbox/create_sandbox_batch/get_sandbox/list_sandboxes/destroy_sandbox - Process & exec —
execplus process-management methods, mirroring the Python/JS shapes - File system —
file_create/view/str_replace/ls/glob/grep - Custom sandbox images — image create/get/list/delete
- Independent storage volumes — volume create/get/list/delete
- Audit log & takeover — log streaming and human-takeover over WebSocket
Error handling
Every fallible call returns Result<T, BoxxkiteError> — a non-2xx response or a connection-level failure both surface through the same error type, so ? composes cleanly through a whole sandbox session.