- Rust 79.7%
- TypeScript 14.5%
- CSS 4.1%
- JavaScript 1.4%
- HTML 0.3%
|
All checks were successful
Build and Test / build (push) Successful in 3m54s
Brings the hero_os repo into D-10 compliance: 0 lab infocheck findings across all 5 binary crates. Changes: - Add 3 new service.toml files at crates/hero_os/, crates/hero_os_app/, crates/hero_os_web/ (kinds cli/cmdline/cmdline, categories core/ui/ui). - Add `[[env]] PATH_ROOT` to existing crates/hero_os_server/service.toml and crates/hero_os_admin/service.toml so lab forwards the var to hero_proc-supervised daemons (required since hero_lib 30a0b34e introduced the herolib_core::base::paths::path_root() startup panic-on-missing). - Wire `service_base!()` + `validate_service_toml(SERVICE_TOML)` + `handle_info_flag(SERVICE_TOML)` into the 5 mains. hero_os_server + hero_os_admin drop their manual `const SERVICE_TOML` lines in favor of the macro. hero_os_app + hero_os_web gate the service-info contract on `#[cfg(not(target_arch = "wasm32"))]` so the wasm build keeps working. - Make `herolib_core` a non-optional dep on hero_os_app (was optional, only pulled by the `mobile` feature); add it to hero_os_web/Cargo.toml. - Rewrite crates/hero_os/src/main.rs CLI to follow the canonical hero_voice pattern: drop the hand-rolled print_info_json / print_startup_info / manual --info+--help arg scanning; replace with the macro-driven flow. Adds the lesson #19 forward_env_if_set helper (PATH_ROOT/PATH_VAR/PATH_BUILD/PATH_CODE/HERO_SOCKET_DIR) on both spawned ActionSpecs in build_service_definition() so the `hero_os --start` CLI path also threads these vars into the daemons (the service.toml [[env]] block only covers the `lab service --start` path). Verification (local): - lab build --release --install --workspace --policy-mode warn: 5 discovered, 5 built, 0 failed - lab infocheck: 5 crate(s) clean, 0 finding(s) total - lab service hero_os_server --start: smoke 4/4 (health + openrpc.json + heroservice.json + system.ping) - lab service hero_os_admin --start: smoke 2/2 (health + heroservice.json) - cargo test --workspace --release: 31 passed, 0 failed, 6 ignored (matches pre-change baseline) Refs: hero_proc#105 (D-10 sweep tracker, hero_os row) |
||
|---|---|---|
| .cargo | ||
| .forgejo/workflows | ||
| .hero | ||
| android/res | ||
| crates | ||
| docs | ||
| schemas/desktop | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| config.toml | ||
| Dioxus.toml | ||
| PURPOSE.md | ||
| README.md | ||
| VALIDATION_REPORT.json | ||
Hero OS
A desktop environment framework built with Dioxus (Rust → WASM) that serves as the host for Hero Archipelago islands. Provides macOS-style window management, context switching, and theming for dynamically loaded WASM applications.
Architecture
hero_os/
├── crates/
│ ├── hero_os/ # CLI — registers services with hero_proc
│ ├── hero_os_server/ # OpenRPC state server (desktop state, windows, layout)
│ ├── hero_os_sdk/ # Type-safe async Rust SDK client
│ ├── hero_os_ui/ # HTTP server — serves WASM assets + RPC proxy
│ ├── hero_os_app/ # Dioxus desktop environment (web/mobile/desktop)
│ ├── hero_os_web/ # Bootstrap shell WASM UI (alternative)
│ └── hero_os_examples/ # Example programs using the SDK
├── schemas/ # OSchema definitions
├── tests/ # Playwright E2E tests
├── Makefile
└── buildenv.sh
Sockets
All services use Unix domain sockets exclusively (no TCP ports).
| Service | Socket Path |
|---|---|
| hero_os_server | $HERO_SOCKET_DIR/hero_os/rpc.sock |
| hero_os_ui | $HERO_SOCKET_DIR/hero_os/web.sock |
Service Communication
Browser
└─ hero_os_app (WASM, served by hero_os_ui)
└─ /rpc/{context} → hero_os_ui (proxy)
└─ Unix socket → hero_osis_server
hero_os CLI (--start/--stop)
└─ hero_proc (process supervisor)
├─ hero_os_server (desktop state, OpenRPC)
└─ hero_os_ui (HTTP + RPC proxy)
Running
Prerequisites: hero_proc_server must be running.
Via nushell (recommended)
service os start --update --reset
service os stop
service os status
Via make
# Install and start all services
make install # Build release binaries → ~/hero/bin/
make start # Register and start via hero_proc
# Development
make installdev # Build debug binaries → ~/hero/bin/
make run # Start + stream logs (Ctrl-C to stop)
make web # Dioxus dev server with hot reload
# Management
make stop # Stop all services
make restart # Stop + start
make status # Show hero_proc status
make logs # Server logs
make logs-ui # UI logs
Full stack (dev)
# Terminal 0: hero_proc (if not already running)
hero_proc_server
# Terminal 1: Backend servers
make run
# Terminal 2: Frontend with hot reload
make web
Platforms
| Platform | Command | Notes |
|---|---|---|
| Web | make web |
Default, Dioxus dev server |
| iOS | make ios |
Requires Xcode |
| Android | make android |
Requires Android SDK |
| Desktop | make desktop |
Native desktop app |
Key Concepts
Contexts
A context is a workspace/namespace that isolates data (e.g., herozero, geomind). Each context has its own desktop state and theme.
Themes
A theme defines visual appearance (colors, typography, spacing). Stored in the backend, referenced by context.
Islands
Islands are self-contained WASM applications loaded as web components from Hero Archipelagos. Each island registers as a custom HTML element, receives configuration via attributes, and makes API calls to the backend.
Testing
make test # Unit tests
make test-all # Full test suite
make e2e # Playwright E2E tests (local)
make e2e-remote # E2E against live VM
Related Documentation
| Document | Purpose |
|---|---|
ARCHITECTURE.md |
Detailed system architecture |
docs/ANDROID.md |
Android/Volla OS setup |
docs/MOBILE.md |
Mobile layout and sizing |
docs/DIOXUS.md |
Dioxus configuration |