SDKs#
Official clients for the Rustbox API. Native idioms per language. One required dependency. One method (run) for the 95% case.
| SDK | Install | Package | Docs |
|---|---|---|---|
| TypeScript | bun add rustbox | rustbox on npm | Reference |
| Python | pip install rustbox | rustbox on PyPI | Reference |
| Go | go get github.com/orkait/rustbox-sdk/go | pkg.go.dev | Reference |
| Rust | cargo add rustbox-sdk | rustbox-sdk on crates.io | Reference |
The full source for every SDK is mirrored at orkait/rustbox-sdk.
What every SDK does#
run(req)- submits the job, waits for sync completion, falls back to polling, returns the verdict. Use this.submit(req, wait?)- low-level. Returns the job id (and verdict ifwait=true).getResult(id)- poll a previously submitted job by id.getLanguages(),getHealth(),getReady()- service introspection.
Built in#
- Auto-retry on transient failures (5xx, network) with exponential backoff. 3 attempts by default.
- Per-request timeout (65s default).
- Idempotency-Key header on every retry-safe POST.
run()auto-generates one. - Typed errors per language. 401/403 maps to an Auth error class, 429 to RateLimit, 5xx to ServerError, etc.
Profiles#
Both Judge and Agent profiles are supported. See Profiles for what they mean.
// TypeScript
client.run({ language: "python", code: "...", profile: "agent" });
# Python
await client.run("python", "...", profile="agent")
// Go
client.Run(rustbox.SubmitRequest{Language: "python", Code: "...", Profile: rustbox.ProfileAgent})
// Rust
client.run(&SubmitRequest {
language: "python".into(),
code: "...".into(),
profile: Some(Profile::Agent),
..Default::default()
}).await?;
Direct HTTP#
You don't need an SDK to use Rustbox. The API Reference shows raw curl calls for every endpoint. SDKs just save you the boilerplate.