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.

SDKInstallPackageDocs
Pythonuv add rustboxrustbox on PyPIReference
TypeScriptbun add rustboxrustbox on npmReference
Rustcargo add rustbox-sdkrustbox-sdk on crates.ioReference
Gogo get github.com/orkait/rustbox-sdk/[email protected]pkg.go.devReference

The source for every SDK is mirrored at orkait/rustbox-sdk.

What every SDK does#

OperationWhat it does
runSends the code and waits for a finished result, polling if the run outlasts the server's 30 s wait
submitQueues a run and returns its id at once
get_resultReads a run by id
judgeRuns the code once per test case and compares stdout with each case's expected output
get_languagesLists the languages the service runs
get_health, get_readyReport whether the service is up

Names follow each language's style: getResult in TypeScript, GetResult in Go.

Built in#

BehaviourDetail
Typed resultsResults, verdicts and statuses are typed. A value the SDK does not know yet decodes as UNKNOWN instead of failing
RetriesReads, 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
Timeout65 s per request by default
ErrorsOne 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
RegionsSet 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.