iii-sdk
Rust SDK for the iii engine.
Install
Add to your Cargo.toml:
[]
= "0.3"
= "1"
= { = "1", = ["full"] }
Hello World
use ;
use json;
async
API
| Operation | Signature | Description |
|---|---|---|
| Initialize | init(url, options) |
Create an SDK instance and auto-connect |
| Register function | iii.register_function(id, |input| ...) |
Register a function that can be invoked by name |
| Register trigger | iii.register_trigger(type, fn_id, config)? |
Bind a trigger (HTTP, cron, queue, etc.) to a function |
| Invoke (await) | iii.trigger(id, data).await? |
Invoke a function and wait for the result |
| Invoke (fire-and-forget) | iii.trigger_void(id, data)? |
Invoke a function without waiting (fire-and-forget) |
init() spawns a background task that handles WebSocket communication, automatic reconnection, and OpenTelemetry instrumentation.
Registering Functions
iii.register_function?;
Registering Triggers
iii.register_trigger?;
Invoking Functions
let result = iii.trigger.await?;
iii.trigger_void?;
Streams
use ;
use json;
async
OpenTelemetry
Enable the otel feature for full tracing and metrics support:
[]
= { = "0.3", = ["otel"] }
Modules
| Import | What it provides |
|---|---|
iii_sdk |
Core SDK (III, types) |
iii_sdk::stream |
Stream client (Streams, UpdateBuilder) |
iii_sdk::telemetry |
OpenTelemetry integration (requires otel feature) |
Deprecated
call() and call_void() are deprecated aliases for trigger() and trigger_void(). They still work but will be removed in a future release.