Comprehensive SAL and automation framework for Hero OS with Rhai scripting.
  • Rust 99.2%
  • HTML 0.5%
  • Makefile 0.3%
Find a file
rawdaGastan f019f1d372
Some checks failed
lab release / release (push) Successful in 11m23s
ci / ci (push) Failing after 22m14s
remove unused hero_aibroker_sdk dependency
2026-06-24 19:57:55 +03:00
.claude refactor(derive,lifecycle): remove hero_serve_rpc! macro, expand server example with full CRUD 2026-05-30 15:55:18 +02:00
.codegraph drop brotli compression; add .codegraph/.gitignore 2026-06-14 12:37:31 +02:00
.forgejo/workflows Merge integration into development (convergence Phase 1) 2026-06-19 17:32:14 -04:00
.hero refactor: rename FORGEJO_TOKEN→FORGE_TOKEN, HERO_SOCKET_DIR→PATH_SOCKET; cmdline→cli kind 2026-05-26 12:00:10 +02:00
crates openrpc_client!: add domain arg making connect() consolidated-aware 2026-06-24 19:14:28 +03:00
docs/hero_lib docs: add sockets internals chapter and booklet.toml for 12_internals 2026-06-22 11:25:18 +02:00
examples cargo: remove all commented-out [patch] blocks; update web README with /api/rpc docs 2026-06-15 10:04:24 +02:00
patches cargo: comment out local [patch] overrides; add [workspace] to patch stubs 2026-06-14 15:26:42 +02:00
.gitignore feat: add OServer framework with auto-generated MCP from OSchema 2026-02-08 15:27:59 +01:00
.test Test 2026-01-02 09:58:52 +01:00
Cargo.toml remove unused hero_aibroker_sdk dependency 2026-06-24 19:57:55 +03:00
ci-containers.conf initial workflow with services (#69) 2026-01-29 16:07:30 +00:00
CLAUDE.md Update changes 2026-06-06 07:51:44 +02:00
LICENSE init 2025-12-08 08:46:44 +01:00
README.md docs: add macro and hero_lifecycle booklets; update README files across workspace 2026-06-22 10:50:34 +02:00
rust-toolchain.toml Update changes 2026-06-06 07:51:44 +02:00

Herocode Herolib Rust

A comprehensive System Abstraction Layer (SAL) and automation framework built in Rust, organized as a Cargo workspace of focused library crates.

Project Overview

Herolib provides a unified interface for system operations, services, cryptography, storage, and AI integration across platforms. It is a library-only workspace — the crates are meant to be consumed as dependencies; the workspace ships no installable binaries.

Workspace Crates

Crate Package Description
core herolib_core Core utilities: text processing, networking, logger, Redis client, and the HeroScript DSL.
os herolib_os Unified system utilities: OS, process, git, kernel/rootfs, and SSH/network helpers.
mos herolib_mos Mycelium Operating System layer: network namespaces, VETH setup, system facts, Cloud Hypervisor VM launcher.
virt herolib_virt Virtualization and container management: Buildah, Nerdctl, Podman, Cloud Hypervisor, qcow2, Kubernetes.
crypt herolib_crypt Asymmetric (Ed25519/X25519) and symmetric cryptography plus HTTP signatures.
vault herolib_vault Secure key management with a Redis backend (Ed25519, Sr25519, symmetric).
sid herolib_sid SmartID — short, human-readable, collision-free identifiers.
clients herolib_clients Unified client library: PostgreSQL, MQTT, Hetzner, VastAI, OpenCode.
clients_core herolib_clients_core Foundational, dependency-light clients: Mycelium, HeroDB, NTP, GeoIP.
code herolib_code Code analysis and parsing utilities for Rust sources, plus a Rust build helper.
oschema herolib_oschema OSIS — canonical types, OTOML serialization, OsisObject trait, OCollection filesystem storage.
oschema_server herolib_oschema_server Axum runtime for OSchema/OpenRPC services: Hero context/claims headers, CRUD hooks, JSON-RPC dispatch.
openrpc herolib_openrpc OpenRPC transport (HTTP-over-UDS, SSE) and spec types.
acp herolib_acp Agent Client Protocol (ACP) client for ACP-compliant AI agents.
ai herolib_ai Direct multi-provider AI client (chat, completions, embeddings, STT/TTS, reranking, image generation, agents).
ai_test ai_direct_test Test harness / CLI exercising herolib_ai against live and mock providers.
macros herolib_macros Derive and function-like proc macros (ToSchema, Otoml, ToHeroScript, FromHeroScript, OsisObject, OpenRPC generators).
hero_lifecycle hero_lifecycle Service-authoring kit for the binary kinds (server/admin/web/cli): service.toml schema + ServiceManifest builder, --info, startup banner, socket prep, and the Hero server builders.
tools herolib_tools Hero development tools: Forgejo management, environment init, secrets, installers, services.

Building & Testing

The workspace builds with standard Cargo. Rust is pinned via rust-toolchain.toml (edition 2024).

# Check / build the whole workspace
cargo check --workspace
cargo build --workspace

# Build or test a single crate
cargo build -p herolib_ai
cargo test  -p herolib_core --lib

# Run the full test suite (as CI does)
cargo test --workspace --lib --bins

CI

Continuous integration runs via Forgejo Actions in .forgejo/workflows/ (ci.yaml), which performs cargo check, cargo build, and cargo test across the workspace.

Prerequisites

  • Rust toolchain matching rust-toolchain.toml (1.96, edition 2024)
  • Git

License

Apache-2.0. See LICENSE for details.