No description
|
|
||
|---|---|---|
| _archive | ||
| benches | ||
| bin | ||
| docs | ||
| examples | ||
| lib | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||
| Dockerfile.dev | ||
| README.md | ||
Horus
Horus is a comprehensive monorepo workspace for Hero infrastructure components, consolidating all ecosystem tools into a single, well-organized codebase.
Workspace Structure
Binaries (bin/)
- Supervisor - Job orchestration and runner management
- Osiris Server - HTTP server for object storage
- Osiris Runner - Rhai scripting with 19 models + Redis persistence
- SAL Runner - System Abstraction Layer runner
Libraries (lib/)
Models
- hero-models - 19 domain models with Redis persistence
- hero-job - Job model types and builders
Clients
- supervisor-client - OpenRPC client (native + WASM)
- osiris-client - Client library for Osiris
- job-client - Redis-based job client
Core
- hero-runner - Core runner library for executing jobs
- osiris-core - Object storage and indexing with GenericStore
- osiris-derive - Derive macros for Osiris
- hero-rhai - Rhai integration macros and derives
Key Components
Osiris Runner (bin/runners/osiris)
Production-ready Rhai scripting engine with:
- 19 Registered Models - Full CRUD for all domain models
- Redis Persistence - GenericStore-backed storage
- Context-Based Permissions - Fine-grained ACL system
- Comprehensive Examples - Working scripts for all models
See Osiris Runner README for details.
Hero Models (lib/models)
19 domain models with consistent patterns:
- BaseData - Common fields (id, namespace, timestamps, tags)
- Builder Pattern - Type-safe construction via
derive_builder - Redis Persistence -
#[derive(Object)]for GenericStore - Rhai Integration - Optional scripting support
Models include: Note, Account, User, Group, Membership, Invoice, Expense, Event, KycInfo, Contract, Verification, FlowTemplate, FlowInstance, Asset, Transaction, and more.
Supervisor (bin/supervisor)
Job orchestration and runner management:
- Job lifecycle management (create, start, stop, delete)
- Runner registration and management
- Redis-based job queuing
- OpenRPC JSON-RPC API with authentication
Osiris Core (lib/osiris/core)
Object storage and indexing:
- GenericStore - Async Redis-backed storage
- HeroDbClient - Redis client with connection pooling
- Automatic Indexing - Fields marked with
#[index] - Type Safety -
Objecttrait for compile-time checks
Building
Build everything
cargo build --workspace
Build supervisor binary
cargo build -p hero-supervisor
Build client library
cargo build -p hero-supervisor-openrpc-client
Build WASM client
cd lib/clients/supervisor
wasm-pack build --target web
Running
Start the supervisor
cargo run -p hero-supervisor -- \
--bind-address 127.0.0.1 \
--port 3030 \
--redis-url redis://127.0.0.1:6379
With configuration file
cargo run -p hero-supervisor -- --config config.toml
Development
Run tests
cargo test --workspace
Check all code
cargo check --workspace
Format code
cargo fmt --all
Lint
cargo clippy --workspace -- -D warnings
Dependencies
- Rust: 1.70+
- Redis: Required for job queuing
- Osiris: Optional, for persistent storage
License
MIT OR Apache-2.0
Installation
Horus is installed via heroscripts and herolib installers. This ensures safe, replicable, and versioned installation of Horus. See installation heroscript