Files
runner_rust/examples
Timur Gordon 14ff6cae67 feat: reorganize examples and add signature support to JobBuilder
- Reorganized examples into osiris/, sal/, and utils/ folders
- Moved hardcoded scripts to separate .rhai files
- Added signature() method to JobBuilder for job signing
- Updated OSIRIS context to use block_in_place instead of runtime
- Removed runtime field from OsirisContext
- Added typed save() methods for Note and Event objects
- Updated all examples to use new structure and APIs
2025-10-27 13:49:39 +01:00
..

Runner Examples

This directory contains organized examples demonstrating different aspects of the runner system.

Directory Structure

examples/
├── osiris/          # OSIRIS context and object management examples
├── sal/             # System Abstraction Layer (SAL) DSL examples
└── utils/           # Utility examples (signing, crypto, etc.)

Running Examples

OSIRIS Example

Complete example demonstrating OSIRIS context management, Note and Event creation, and access control:

cargo run --example osiris

See osiris/README.md for details.

SAL Example

Examples demonstrating various SAL DSL modules for system operations:

cargo run --example sal

See sal/README.md for details.

Utility Examples

Utility examples for cryptographic operations and job signing:

cargo run --example sign_job --features crypto

See utils/README.md for details.

Prerequisites

  • Redis server running on localhost:6379
  • For OSIRIS examples: HeroDB instance (or uses local SQLite)
  • For crypto examples: Enable the crypto feature flag

Example Structure

Each example folder contains:

  • main.rs - The main Rust example code
  • *.rhai - Rhai script files demonstrating various features
  • README.md - Detailed documentation for that example category