SDKs#

Official clients for the Rustbox API. Native idioms per language. One required dependency. One method (run) for the 95% case.

SDKInstallPackageDocs
TypeScriptbun add rustboxrustbox on npmReference
Pythonpip install rustboxrustbox on PyPIReference
Gogo get github.com/orkait/rustbox-sdk/gopkg.go.devReference
Rustcargo add rustbox-sdkrustbox-sdk on crates.ioReference

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 if wait=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.