- 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
55 lines
1.4 KiB
Markdown
55 lines
1.4 KiB
Markdown
# 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:
|
|
|
|
```bash
|
|
cargo run --example osiris
|
|
```
|
|
|
|
See [osiris/README.md](osiris/README.md) for details.
|
|
|
|
### SAL Example
|
|
Examples demonstrating various SAL DSL modules for system operations:
|
|
|
|
```bash
|
|
cargo run --example sal
|
|
```
|
|
|
|
See [sal/README.md](sal/README.md) for details.
|
|
|
|
### Utility Examples
|
|
Utility examples for cryptographic operations and job signing:
|
|
|
|
```bash
|
|
cargo run --example sign_job --features crypto
|
|
```
|
|
|
|
See [utils/README.md](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
|