Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime helpers shared by generated REST clients.

Gated behind the runtime-client feature so SDK crates can re-export the contract types without pulling in toolkit-http / tokio transitively.

§Why a submodule, not its own crate

The runtime-client feature already provides the same isolation as a crate boundary would — IR-only consumers don’t compile or link any of the HTTP/SSE/retry plumbing. Splitting into a separate toolkit-contract-runtime crate would add Cargo / CI ceremony without changing what gets compiled in either configuration. The split is only warranted if a hand-written client wants to consume the runtime standalone (without toolkit-contract’s IR + macros). Until that consumer exists, YAGNI.

Modules§

canonical
Conversion from TransportError into toolkit_canonical_errors::CanonicalError.
client
Per-call helpers used by the generated REST client.
config
Client, retry, and credential configuration consumed by generated clients.
http
HTTP helpers shared by the generated REST client codegen.
resolving
Directory-resolving REST transport.
retry
Bounded exponential-backoff retry helper used by generated clients.
sse
Server-Sent Events (SSE) parser used by streaming clients.
transport_error
TransportError — uniform transport-layer error surfaced by generated REST clients.