Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime support for choreographic protocol execution

This module provides:

  • Cross-platform async spawning utilities

§Architecture

The runtime module provides the infrastructure for executing generated protocol code on native and WASM targets. Execution itself is modeled through the effect system in crate::effects; this module is only the platform/runtime support layer.

┌─────────────────────────────────────────────────────────────┐
│                    Generated Code                            │
│          Effect Programs + ChoreoHandler                    │
└─────────────────────────────────────────────────────────────┘
                             │
                             ▼
┌─────────────────────────────────────────────────────────────┐
│                   Runtime Utilities                          │
│          spawn(), spawn_local(), clocks                      │
└─────────────────────────────────────────────────────────────┘
                             │
                             ▼
┌─────────────────────────────────────────────────────────────┐
│                 Transport Implementation                     │
│              Handlers / Transport Layers                    │
└─────────────────────────────────────────────────────────────┘

Re-exports§

pub use clock::SystemClock;
pub use clock::SystemRng;
pub use spawn::spawn;
pub use spawn::spawn_local;
pub use spawn::AsyncRuntime;

Modules§

clock
System clock and RNG for production runtime
spawn
Runtime abstraction layer for cross-platform async execution
sync
Platform-specific synchronization primitives