一键导入
iii-rust-sdk
Rust SDK for the iii engine. Use when building high-performance workers, registering functions, or invoking triggers in Rust.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Rust SDK for the iii engine. Use when building high-performance workers, registering functions, or invoking triggers in Rust.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
KTG content marketing pipeline. Takes a written blog post and runs the full publishing workflow: repurpose for all platforms, generate hero image, SEO and AI citation optimisation, then pause for green-light before publishing to all channels via Composio. Local-first: uses Ollama for text tasks where quality allows, cloud for image gen and live data. Use when user says "hub", "/hub", "publish this", "run the pipeline", "post this everywhere".
KTG content marketing pipeline — SWARM MODE. Orchestrates 7 plugins via parallel agent dispatch. Drop a post, get it published everywhere with maximum parallelism. Local-first: Ollama for text, cloud for images and live data. Agents run simultaneously, not sequentially.
KTG content marketing pipeline — SWARM MODE v2. Concrete 11-agent parallel pipeline using the Agent tool. Local-first: Ollama for text, cloud for images and publish. Drop a post, spawn agents, publish everywhere.
Browser SDK for connecting to the iii engine from web applications via WebSocket. Use when building browser-based clients that register functions, invoke triggers, or consume streams from the frontend.
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
Registers cron triggers with 7-field expressions to run functions on recurring schedules. Use when scheduling periodic jobs, timed automation, crontab replacements, cleanup routines, report generation, batch processing, or calendar-based work that is genuinely time-driven.
| name | iii-rust-sdk |
| description | Rust SDK for the iii engine. Use when building high-performance workers, registering functions, or invoking triggers in Rust. |
The 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.