Rust SDK for the iii engine. Use when building high-performance workers, registering functions, or invoking triggers in Rust.
58
66%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/iii-rust-sdk/SKILL.mdThe native async Rust SDK for connecting workers to the iii engine via tokio.
Full API reference: https://iii.dev/docs/api-reference/sdk-rust
Use Cargo:
cargo add iii-sdk| Export | Purpose |
|---|---|
register_worker(url, InitOptions) | Connect to the engine, returns III client |
InitOptions { metadata, headers, otel } | Worker metadata, auth headers, OpenTelemetry config |
III::register_function(RegisterFunction::new(id, handler)) | Register a sync function using the builder API |
III::register_function(RegisterFunction::new_async(id, handler)) | Register an async function using the builder API |
III::register_function_with(message, handler_or_http_config) | Register from a full message, including HTTP-invoked functions |
RegisterFunction | Builder with .description() and .metadata() |
HttpInvocationConfig / HttpAuthConfig | External HTTP endpoint invocation config |
IIITrigger | Typed built-in trigger builders |
RegisterTriggerType / TriggerTypeRef | Typed custom trigger type builders |
III::register_trigger(RegisterTriggerInput) | Bind a trigger to a function |
III::trigger(TriggerRequest) | Invoke a function |
TriggerAction::Void | Fire-and-forget invocation |
TriggerAction::Enqueue { queue } | Durable async invocation |
IIIError | SDK, handler, timeout, and remote error type |
ChannelReader / ChannelWriter / extract_channel_refs() | Binary/text channel APIs |
Logger | Structured logs |
with_span, run_in_span, OtelConfig | OpenTelemetry instrumentation |
execute_traced_request | HTTP client with trace context propagation |
RegisterFunction::new("id", handler) for sync handlers, RegisterFunction::new_async("id", handler) for asyncschemars::JsonSchema get auto-generated request and response schemas.description("...") and .metadata(json!(...)) on RegisterFunction to document the functiontokio::time::sleep loop) for event processingregister_trigger returns Ok(()) on success; propagate errors with ?Use register_function_with(RegisterFunctionMessage, HttpInvocationConfig) when a function ID should call an external HTTP endpoint instead of a local Rust handler.
Auth modes:
HttpAuthConfig::Hmac { secret_key }HttpAuthConfig::Bearer { token_key }HttpAuthConfig::ApiKey { header, value_key }secret_key, token_key, and value_key name environment variables. Do not put raw credentials in config.
RegisterTriggerType::new(id, description, handler) registers a custom trigger type..trigger_request_format::<T>() for trigger config schema and .call_request_format::<T>() for function payload schema.TriggerTypeRef<C, R> has typed register_trigger, register_trigger_with_metadata, register_function, and register_function_async.IIITrigger for typed built-in trigger builders when authoring Rust workers that bind HTTP, cron, queue, state, stream, or log triggers.let channel = iii.create_channel(None).await?channel.reader_ref or channel.writer_ref through a trigger payload.ChannelReader::new(engine_ws_base, &reader_ref) and ChannelWriter::new(engine_ws_base, &writer_ref) when reconstructing refs from payloads.next_binary() for incremental chunks, read_all() for full buffers, and send_message() for text messages.extract_channel_refs(&serde_json::Value) to find refs inside nested payloads.IIIError::Remote { code, message, stacktrace } carries engine error codes such as FORBIDDEN, TIMEOUT, function_not_found, function_not_invokable, invocation_failed, and invocation_stopped. IIIError::Timeout, IIIError::NotConnected, IIIError::Handler, IIIError::Serde, and IIIError::WebSocket describe SDK/local failures.
iii-functions-and-triggersiii-http-middlewareiii-channelsiii-error-handlingiii-node-sdkiii-python-sdkiii-browser-sdkiii-rust-sdk in the iii engine.a7ebbbb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.