A3S Box
SDK
Rust execution abstractions for A3S Box workloads
SDK
The current SDK surface is a Rust crate, a3s-box-sdk. It is not a Docker-style client SDK and does not currently provide the Python or TypeScript clients that older docs referenced.
What It Provides
ExecutionRegistryas the entry point for workload execution policy.ExecutionAdapterfor pluggable backends.BoxWorkloadEnvelopeandBoxRuntimeSpecshared types froma3s-box-core.VmExecutorand pool statistics abstractions for integrating Box into higher-level runtimes.
Example
use a3s_box_sdk::{
BoxRuntimeSpec, BoxWorkloadEnvelope, ExecutionRegistry, RuntimeClass, WorkloadKind,
};
use std::time::Duration;
#[tokio::main]
async fn main() {
let registry = ExecutionRegistry::new();
let envelope = BoxWorkloadEnvelope {
runtime_class: RuntimeClass::A3sBox,
workload_kind: WorkloadKind::ExecutionTask,
runtime: BoxRuntimeSpec {
runtime: "a3s/executor/http".into(),
entrypoint: "a3s-executor".into(),
args: vec!["--handler".into(), "get".into()],
env: Default::default(),
},
input: serde_json::json!({"url": "https://example.com"}),
labels: Default::default(),
};
let result = registry
.execute_box_workload(&envelope, Duration::from_secs(300))
.await;
println!("{result:?}");
}Boundary
Use the CLI for general local development. Use the SDK when embedding A3S Box into another Rust runtime that already understands Box workload envelopes and execution policy.