Releases: temporalio/sdk-core
v0.2.0
Features
Schedule Handles
The Rust SDK now includes full support for Temporal Schedules, allowing you to create, describe, update, pause, trigger, and delete schedules from the client.
use temporalio_client::{Client, CreateScheduleOptions, ScheduleAction, ScheduleSpec};
use std::time::Duration;
// Create a schedule that starts a workflow every hour
let handle = client
.create_schedule(
"my-schedule-id",
CreateScheduleOptions::builder()
.action(ScheduleAction::start_workflow("MyWorkflow", "my-task-queue", "wf-id"))
.spec(ScheduleSpec::from_interval(Duration::from_secs(3600)))
.build(),
)
.await?;
// Interact with the schedule
let desc = handle.describe().await?;
handle.pause(Some("maintenance window")).await?;
handle.unpause(Some("back online")).await?;
handle.delete().await?;Workflow Context Additions
The workflow context now exposes additional runtime information:
continue_as_new_suggested(): if the server suggests the workflow should continue-as-new (e.g. due to history size)workflow_id()andrun_id(): access the current workflow's identity directly from the context
#[run]
async fn run(ctx: &mut WorkflowContext<Self>) -> WorkflowResult<()> {
let wf_id = ctx.workflow_id();
let run_id = ctx.run_id();
// Check if we should continue-as-new
if ctx.continue_as_new_suggested() {
return ctx.continue_as_new(/* ... */);
}
}Deterministic Future Helpers
Workflow code must be deterministic. Standard concurrency primitives like tokio::select! or futures::select! introduce nondeterministic polling order that will break workflow replay. The SDK now provides deterministic wrappers in temporalio_sdk::workflows that are safe to use in workflow code: temporalio_sdk::workflows::select!, temporalio_sdk::workflows::join!, and temporalio_sdk::workflows::join_all().
Dependency Cleanup
The Rust SDK originated as the shared core powering Temporal's language SDKs (Python, TypeScript, .NET, etc.), and as a result it carries dependencies that not all users need. We are actively trimming this down using Cargo features so you only pay for what you use. This is ongoing work, but we appreciate contributions from the community that start this process:
- Removal of unused
protobufdependency from optionalprometheusdependency intemporalio_common: #1134 by @maltere - Removal of
otelas default feature fortemporalio_commonandtemporalio_sdk_core: #1154 by @sachinsharma3191
Bug Fixes
- fix(sdk): provide default worker identity (#1123)
- Return ClientWorkerSet from Connection (#1147)
- Fix possible NDE in valid child workflow cancel transition by (#1162)
- fix(client): retry
WorkflowUpdateHandle::get_resultpoll (#1150) - fix(core): avoid panic if workflow stream still up during eviction (#1158)
- no longer cancel pending polls on shutdown (#1122)
Full Changelog: v0.1.0-alpha.1...v0.2.0
v0.1.0-alpha.1
This is the initial release of the Temporal Rust SDK
This release includes
- Client support
- Activity and Workflow Worker support
This release does not support
- Schedules
- Eager Workflow Start
- Update with Start
- Dynamic Handlers