An attempt to start documenting the rust sdk for temporal and how to use it following some of the examples in typescript

Overview

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.
You might also like...
SDK for the Portfolio protocol written in rust.

portfolio-rs Minimalist toolkit for building rust applications on top of the portfolio protocol. Installation [Required] Foundry. Source. If not insta

Print out some fibonacci numbers.

give-me-some-fibonacci A Rust library for some fibonacci. TL;DR: its just a joke. Usage To get started using give_me_some_fibonacci, just add this to

Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.
Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

rust database for you to use and help me make!

Welcome To Rust Database! What is this? this is a database for you to git clone and use in your project! Why should i use it? It is fast and it takes

Make and use playgrounds locally.

cargo playground Cargo playground opens a local playground in the editor of your choice. Install You can install it directly using cargo $ cargo insta

Simple and minimalist forward auth service intended for use with reverse proxies (Traefik, Caddy, nginx, etc)
Simple and minimalist forward auth service intended for use with reverse proxies (Traefik, Caddy, nginx, etc)

nforwardauth nforwardauth is an extremely lightweight, blazing fast forward auth service that lets you use a single authentication middleware for all

A tool to use docker / podman / oci containers with rust

contain-rs A tool to use docker / podman / oci containers with rust TODO improve error types improve error reporting handle std error for child proces

Demonstration of how to use the rust object_store crate

Introduction Demonstration of how to use the Rust object_store crate Example

Game development practices with Rust programming language. I want to use different crates for this.

Hazır Oyun Motorlarını Kullanarak Rust Dili Yardımıyla Oyunlar Geliştirmek Rust programlama dilinde oyun geliştirmek için popüler birkaç hazır çatıyı

Owner
Cosm
Cosm
A collection (eventually) of examples that use some non-beginner things.

nannou examples A collection (eventually) of examples that use some non-beginner things. Right now the only example combines nannou's standard draw AP

Alexis Andre 22 Oct 21, 2022
🍋: A General Lock following paper "Optimistic Lock Coupling: A Scalable and Efficient General-Purpose Synchronization Method"

Optimistic Lock Coupling from paper "Optimistic Lock Coupling: A Scalable and Efficient General-Purpose Synchronization Method" In actual projects, th

LemonHX 22 Oct 13, 2022
💩 Small HTTP client for the Webpurify API following the sans-io approach 🦀

?? tame-webpurify Super simple client for the WebPurify REST API What is this? An incredibly small library to interact with the https://www.webpurify.

Embark 8 May 1, 2023
An attempt at implementing a state-of-the-art Voxel DAG in Rust

VDAG Introduction This is an attempt at implementing a state-of-the-art compressed voxel data structure, as described in a number of papers ([PDFs] Ka

SamCasavant 2 Aug 25, 2022
Code Examples in Rust. Reviewing RUST

There are some RUST example code here. Run like this cargo run --example enums cargo run --example iterator ... You can learn about RUST coding from

James Johnson 9 Oct 1, 2022
A ML-Inspired programming language that transpiles to Typescript

Hazure Programming language that compiles to Typescript! Note: Everything in this project can be changed at anytime! (I'm still finding out what work

azur 36 Dec 19, 2022
A simpler and 5x faster alternative to HashMap in Rust, which doesn't use hashing and doesn't use heap

At least 5x faster alternative of HashMap, for very small maps. It is also faster than FxHashMap, hashbrown, ArrayMap, and nohash-hasher. The smaller

Yegor Bugayenko 12 Apr 19, 2023
An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

null 2 Oct 24, 2021
Some UwU and OwO for your Rust code

UwU Types Some UwU and OwO for your Rust code This is a Rust crate inspired by this tweet from @thingskatedid / @katef. Credits Some extra functionali

Evan Pratten 12 Feb 8, 2022
An mdBook single PDF generator using pure Rust and some Node.js

mdbook-compress An mdBook backend renderer to generate a single PDF file for a full book. There are other similar projects, but most rely on chrome in

nxe 44 Jan 20, 2023