No description
  • Rust 45.3%
  • JavaScript 37.8%
  • HTML 12.2%
  • CSS 4.7%
Find a file
despiegk 30f3cf2a13
Some checks failed
Tests / test (push) Failing after 2s
Build and Test / build (push) Failing after 3s
chore: add build logs and update Cargo.lock from release build
New build logs captured from multi-platform release builds (aarch64-apple-darwin,
aarch64-unknown-linux-musl, x86_64-unknown-linux-musl). Updated build artifacts
and reporting documents.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-10 22:43:14 +02:00
.cargo hero_builder: add musl cross-compilation support and documentation 2026-05-08 22:19:37 +02:00
.forgejo/workflows feat: initial hero_runner_v2 implementation 2026-03-28 17:34:43 +01:00
.hero chore: add build logs and update Cargo.lock from release build 2026-05-10 22:43:14 +02:00
crates chore: migrate to hero_admin_lib shared assets 2026-05-10 16:19:59 +02:00
examples/runner chore: remove deprecated hero_runner crates 2026-04-05 17:11:46 +02:00
testcases feat(runner): embed nushell alongside rhai and python 2026-04-19 10:28:27 +02:00
tests/integration Refactor: add hero_builder and reorganize code architecture 2026-05-08 21:31:43 +02:00
.gitignore Auto-sync: local changes 2026-05-02 22:26:30 +02:00
Cargo.lock chore: add build logs and update Cargo.lock from release build 2026-05-10 21:03:57 +02:00
Cargo.toml chore: migrate to hero_admin_lib shared assets 2026-05-10 16:19:59 +02:00
PURPOSE.md fix: remove hero_code_ui duplicate, fix binary names, remove Makefile/.sh scripts, fix ureq 3.x API 2026-05-07 22:08:13 +02:00
README.md chore: fix service_code.nu naming and remove bash scripts 2026-05-08 16:29:16 +02:00

hero_code

Hero OS service — multi-language script execution engine.

Runs Rhai, Nushell, and Python scripts in isolated worker pools and exposes a JSON-RPC 2.0 interface over Unix sockets.

Binaries

Binary Role
hero_code_server Main RPC daemon — executes scripts, stores jobs
hero_code_admin Admin dashboard web UI (Unix socket: admin.sock)
hero_code CLI — registers and manages the service lifecycle

Sockets

Socket Purpose
$HERO_SOCKET_DIR/hero_code/rpc.sock JSON-RPC 2.0 API for script execution
$HERO_SOCKET_DIR/hero_code/admin.sock Admin dashboard HTTP

Languages Supported

  • Rhai — embedded scripting (pre-forked worker pool)
  • Nushell — shell-style scripting (pre-forked worker pool)
  • Python — via uv external process runner

Service Lifecycle

Start and manage via nushell service scripts only:

service code start --update --reset
service code stop
service code status

Architecture

  1. Worker pools for Rhai and Nushell are pre-forked before the tokio runtime starts (required to avoid unsafe fork() in a multithreaded process).
  2. The tokio runtime then starts the JSON-RPC HTTP server on rpc.sock.
  3. Jobs are stored in a local SQLite database (~/hero/var/hero_code.db).
  4. The admin UI is a separate Axum process registered with hero_proc.