No description
  • Rust 78.3%
  • Shell 10.8%
  • CSS 7.4%
  • TypeScript 2.2%
  • Makefile 1.1%
  • Other 0.2%
Find a file
2026-03-25 15:50:41 +01:00
.forgejo/workflows fix: consolidate CI into single job to avoid runner cancellation 2026-02-12 22:15:49 +01:00
android/res Phase 2e/2f: Bootstrap 5.3 theme unification + dock sizing 2026-03-06 20:04:41 -05:00
crates Merge branch 'development' of https://forge.ourworld.tf/lhumina_code/hero_os into development 2026-03-25 15:50:41 +01:00
docs refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
schemas/desktop feat: migrate to OServer::run_cli() and rename contexts → spaces 2026-03-12 15:09:55 +01:00
scripts chore: add build_lib.sh and update Makefile to use it 2026-03-20 10:38:09 +01:00
tests/e2e Add Playwright E2E theme tests — light/dark mode, toggle, contrast checks 2026-03-07 02:14:16 -05:00
.gitignore refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
buildenv.sh refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
Cargo.lock refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
Cargo.toml refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
config.toml feat: complete zinit → hero_proc migration (#65) 2026-03-20 10:31:58 -04:00
Dioxus.toml refactor: rename hero_os_http to hero_os_ui, hero_os_ui to hero_os_app 2026-03-05 08:59:18 -05:00
Makefile refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00
README.md refactor: rename crates and switch to Unix domain sockets 2026-03-25 15:50:37 +01:00

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/var/sockets/hero_os_server.sock
hero_os_ui ~/hero/var/sockets/hero_os_ui.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.

# 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
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