MCPcopy Index your code
hub / github.com/cosm-public/temporal-samples-rust

github.com/cosm-public/temporal-samples-rust @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
31 symbols 47 edges 33 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Temporal Rust SDK Samples

This is an attempt to start documenting the rust sdk for temporal and how to use it following some of the examples in typescript. For reference the typescript examples are available at https://github.com/temporalio/samples-typescript.

Notes

The rust sdk is still in alpha and a lot could change in terms of how it is used. Use at your own risk.

Also, Cosm is not associated with temporal in any way (except that we use it) so this is not official documentation for temporal.

Installation

You'll need to clone the repo for the rust sdk and put it at a level one above this repo. They don't publish crates yet so you'll need this.

You can get it here:

# clone the sdk
git clone https://github.com/temporalio/sdk-core.git
# clone this repo
git clone https://github.com/cosm-eng/temporal-samples-rust

cd temporal-samples-rust

Install the temporal server

brew install temporal

API demos

Activity APIs and design patterns

  • Activities Examples:
  • makeHTTPRequest: Make an external HTTP request in an Activity (using reqwest).
  • doSomethingAsync: Complete an Activity async with AsyncCompletionClient.
  • Activity Cancellation and Heartbeating: Heartbeat progress for long running activities and cancel them. Plus how to skip activities and cleaning up.
  • Timer: Timer example to send an email notification for a long running process.
  • Schedule Workflow: Demonstrates a recurring Workflow Execution that occurs according to the schedule documentation: Schedule.

Core symbols most depended-on inside this repo

get_client
called by 9
temporal-helpers/src/client.rs
start_worker
called by 1
activities-examples/src/worker.rs
do_some_work
called by 1
activities-examples/src/activities/async_completion.rs
start_worker
called by 1
activities-cancellation-heartbeating/src/worker.rs
ping
called by 1
activities-cancellation-heartbeating/src/activities/fake_progress_activity.rs
sample_timer_workflow
called by 1
timer/src/workflows.rs
start_worker
called by 1
timer/src/worker.rs
start_worker
called by 1
schedule/src/worker.rs

Shape

Function 29
Class 2

Languages

Rust100%

Modules by API surface

activities-examples/src/activities/async_completion.rs3 symbols
timer/src/worker.rs2 symbols
activities-examples/src/workflows.rs2 symbols
activities-examples/src/activities/make_http_request.rs2 symbols
activities-cancellation-heartbeating/src/activities/fake_progress_activity.rs2 symbols
timer/src/workflows.rs1 symbols
timer/src/bin/main.rs1 symbols
timer/src/bin/client.rs1 symbols
timer/src/activities/send_email_activity.rs1 symbols
timer/src/activities/order_processing_activity.rs1 symbols
temporal-helpers/src/parse_activity_result.rs1 symbols
temporal-helpers/src/client.rs1 symbols

For agents

$ claude mcp add temporal-samples-rust \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact