No description
- Rust 45.3%
- JavaScript 37.8%
- HTML 12.2%
- CSS 4.7%
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> |
||
|---|---|---|
| .cargo | ||
| .forgejo/workflows | ||
| .hero | ||
| crates | ||
| examples/runner | ||
| testcases | ||
| tests/integration | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| PURPOSE.md | ||
| README.md | ||
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
uvexternal process runner
Service Lifecycle
Start and manage via nushell service scripts only:
service code start --update --reset
service code stop
service code status
Architecture
- Worker pools for Rhai and Nushell are pre-forked before the tokio runtime
starts (required to avoid unsafe
fork()in a multithreaded process). - The tokio runtime then starts the JSON-RPC HTTP server on
rpc.sock. - Jobs are stored in a local SQLite database (
~/hero/var/hero_code.db). - The admin UI is a separate Axum process registered with
hero_proc.