SDKs#
Official clients for the Rustbox judge API. All four share one version (0.6.0) and one contract, published in the SDK repository as contract/. Every SDK replays that contract in its tests, so they cannot drift apart.
| SDK | Install | Package | Docs |
|---|---|---|---|
| Python | uv add rustbox | rustbox on PyPI | Reference |
| TypeScript | bun add rustbox | rustbox on npm | Reference |
| Rust | cargo add rustbox-sdk | rustbox-sdk on crates.io | Reference |
| Go | go get github.com/orkait/rustbox-sdk/[email protected] | pkg.go.dev | Reference |
The source for every SDK is mirrored at orkait/rustbox-sdk.
What every SDK does#
| Operation | What it does |
|---|---|
run | Sends the code and waits for a finished result, polling if the run outlasts the server's 30 s wait |
submit | Queues a run and returns its id at once |
get_result | Reads a run by id |
judge | Runs the code once per test case and compares stdout with each case's expected output |
get_languages | Lists the languages the service runs |
get_health, get_ready | Report whether the service is up |
Names follow each language's style: getResult in TypeScript, GetResult in Go.
Built in#
| Behaviour | Detail |
|---|---|
| Typed results | Results, verdicts and statuses are typed. A value the SDK does not know yet decodes as UNKNOWN instead of failing |
| Retries | Reads, and submits that carry an Idempotency-Key, retry 5xx, timeouts and network errors twice with backoff. run sets the key for you. judge and a submit without a key are never retried, so a run never executes twice |
| Timeout | 65 s per request by default |
| Errors | One typed error per kind: config, auth (401/403), rate limit (429, with Retry-After), server (5xx), API (other 4xx, with the server's message), timeout, transport and decode |
| Regions | Set RUSTBOX_REGION or pass a region to pin one. Today there is one region, in, so nothing is probed |
Direct HTTP#
You don't need an SDK to use Rustbox. The API Reference shows raw curl calls for every endpoint.