This project is a Rust workspace implementing a desktop-style runtime and app shell that can run in browser (wasm32) or Tauri-hosted environments. It is organized into contract, runtime, host, storage-adapter, and app crates, with state managed through a reducer/effect model and persistence routed through typed host/storage abstractions.
It includes strong local tooling (xtask) for verification, documentation contract enforcement, and operational workflows, with moderate unit/integration test coverage concentrated in runtime and adapter logic.
Documentation is split by intent:
rustdoc(generated from Rust source comments) is the authoritative API/reference surface.- GitHub Wiki is the canonical documentation hub and navigation surface, organized with Diataxis (tutorials, how-to guides, explanations, and project reference indexes).
docs/(repo-native Markdown) remains the canonical storage for documentation governance, contracts, ADRs, SOPs, diagrams/assets, and tooling reference, validated bycargo xtask docs..ai/directory contains machine-consumable context for Claude and other LLMs, including architectural rules, operational contracts, naming conventions, and validation requirements. See .ai/INDEX.md for the discovery entry point.
- Desktop shell with taskbar, launcher menu, windows, and persistence hooks
- Runtime behavior centered on reducer state transitions and
RuntimeEffectexecution - Cross-environment shell execution path (browser/WASM and Tauri-hosted desktop workflows)
- Offline-first browser storage architecture:
- IndexedDB for versioned namespaced app/system state and virtual filesystem
- Cache API for cached file previews/responses
- localStorage for lightweight preferences/config
- in-memory session store for ephemeral UI state
- Deep-link bootstrap (
/?open=..., hash variants) - Mounted app crates:
Explorer(File System Access API + IndexedDB virtual FS fallback)Notepad(editable persisted workspace)Calculator(persisted memory/tape/history state)Terminal(persisted transcript/input workspace)
- Placeholder app panels:
Paint(persisted placeholder settings/state schema scaffold)Dial-up
- Docs-as-code system with Diataxis structure, governance contracts, and Rust-native local validation/audit workflows
Prerequisites:
- Rust toolchain
wasm32-unknown-unknowntarget- trunk
Install prerequisites (one-time):
cargo setup-webCreate the recommended external GitHub Wiki checkout when you need to edit or validate wiki content:
cargo wiki cloneStart local prototype server:
cargo devStart/stop a managed background dev server (Rust-managed lifecycle; logs/state under .artifacts/dev-server/):
cargo dev start
cargo dev status
cargo dev logs --lines 80
cargo dev stopRestart the managed background server:
cargo dev restartBuild a development static bundle (non-release) with the same trunk pipeline:
cargo dev buildBuild a production-like static bundle:
cargo web-buildRun the Tauri desktop shell workflow (Stage 2 scaffold):
cargo xtask tauri check
cargo tauri-dev
cargo tauri-buildcargo tauri-dev / cargo tauri-build use Tauri hooks that delegate frontend serve/build work to cargo dev (xtask) and normalize NO_COLOR=1 to NO_COLOR=true for Trunk compatibility in environments that export numeric NO_COLOR.
cargo dev serve/build defaults disable Trunk SRI and file hashing (--no-sri=true, --filehash=false) unless explicitly overridden, which keeps the local prototype loop stable when assets are rebuilt frequently.
Run prototype-specific compile checks (CSR native + WASM):
cargo web-checkFast inner-loop validation scoped to changed packages/docs:
cargo flowFast verification (workspace Rust + docs):
cargo verify-fastcargo verify-fast automatically skips desktop host (desktop_tauri) checks when changed files do not touch desktop/host boundary trigger paths. Override auto-detection when needed:
cargo verify-fast --with-desktop
cargo verify-fast --without-desktopProfile-driven verification is also available:
cargo verify --profile dev
cargo verify --profile ci-fast
cargo verify --profile ci-full
cargo verify --profile releaseProfile definitions live in tools/automation/verify_profiles.toml.
Run local automation/tooling diagnostics and safe auto-remediation:
cargo doctor
cargo doctor --fixResolve the Cargo-managed E2E profile surface and prerequisites:
cargo e2e list
cargo e2e doctor
cargo e2e run --profile local-dev --dry-run
cargo e2e run --profile local-dev --scenario ui.shell.layout-baseline --slice shell.soft-neumorphic.default --no-diff
cargo e2e inspect --run <run-id>
cargo e2e promote --profile local-dev --scenario ui.shell.layout-baseline --slice shell.soft-neumorphic.default --source-run <run-id>The current E2E slice now includes the first executable browser path: profiles and scenario sets are
versioned under tools/automation/, cargo e2e doctor checks the local prerequisites, and
cargo e2e run --profile ... starts an isolated per-run trunk serve instance under
.artifacts/e2e/, bootstraps tools/e2e/ with npm ci when needed, and runs the Playwright
harness with artifacts under .artifacts/e2e/runs/. Each browser run now writes a deterministic
UI feedback manifest at reports/ui-feedback-manifest.json plus per-slice screenshots, DOM
snapshots, accessibility snapshots, layout metrics, logs, traces, and diff artifacts. Approved
baselines live under tools/e2e/baselines/ and are updated only through cargo e2e promote.
Profile settings now materially affect the run: ci-headless uses headless Chromium plus
retry-on-failure policy for validation, cross-browser fans out across Chromium/Firefox/WebKit,
and debug runs headed with slow motion and always-retained traces. Desktop tauri-webdriver
profiles are now versioned in the same config surface and reported by cargo e2e doctor, but
macOS remains the stable browser-first development path.
Desktop Linux/Windows execution is staged behind the same Cargo surface and tracked in
docs/reference/cargo-e2e-desktop-platform-todo-spec.md; on macOS, those profiles fail
immediately with an explicit unsupported-platform message.
cargo e2e run --dry-run remains available for config-only validation.
Full verification (fast verification + prototype checks + optional clippy/trunk build):
cargo verifycargo verify remains exhaustive and always includes desktop host coverage. Profile-driven
verification via cargo verify --profile <name> can now optionally append a Cargo-managed E2E
stage from tools/automation/verify_profiles.toml after the normal Rust/docs/clippy stages.
cargo verify-fast and cargo verify print per-stage timing so bottlenecks are observable
directly from command output.
Compatibility make targets still work (delegating to Cargo aliases):
make flow
make doctor
make verify-fast
make verify
make proto-serve
make proto-start
make proto-stop
make proto-logsDirect commands remain available if you prefer (cargo run -p xtask -- ..., trunk ...).
Workflow run artifacts are emitted to .artifacts/automation/runs/<run-id>/ with manifest.json and events.jsonl for postmortem/debug tooling.
Useful ad-hoc full-workspace aliases:
cargo check-all
cargo test-allThe repository now exposes a standardized performance workflow through xtask so benchmark runs, baselines, and profiling artifacts are repeatable across local environments.
Tooling availability check:
cargo perf doctorCapture a repeatable local development-loop baseline report:
cargo perf dev-loop-baseline --output .artifacts/perf/reports/dev-loop-baseline.jsonEnable local compiler caching (optional, local-first):
source scripts/dev/setup-sccache.sh
sccache --show-statsPreflight functional correctness before optimization (unit/integration tests, all-features tests, doctests, benchmark target compile):
cargo perf checkRun workspace benchmarks (including Criterion benches where present):
cargo perf benchCapture and compare Criterion baselines:
cargo perf baseline local-main
cargo perf compare local-mainProfile CPU and memory (optional tools; host/OS dependent):
cargo perf flamegraph --bench <bench_name>
cargo perf heaptrack -- cargo bench --workspacePerformance artifacts default to .artifacts/perf/. See the performance SOP/reference pages (indexed from the wiki) for baseline thresholds, workload guidance, and documentation expectations for optimization decisions.
Use the GitHub Wiki as the primary documentation entry point for project navigation and artifact discovery:
- knowledge base: https://github.com/justinrayshort/os/wiki
- git-backed wiki repository: https://github.com/justinrayshort/os.wiki.git
- formal artifacts:
docs/ - API reference workflow:
cargo doc --workspace --no-deps
The wiki is maintained as a separate git repository outside the main source tree. The recommended local checkout path is ../os.wiki, managed through cargo wiki clone, cargo wiki status, and cargo wiki verify.
When adding or changing formal artifacts such as ADRs, SOPs, diagrams, or command references, update the corresponding wiki reference/index pages in the external wiki checkout and record the wiki commit SHA in PR or review notes.
Generate Rust API reference locally:
cargo doc --workspace --no-depsRun rustdoc examples (doctests):
cargo test --workspace --docRun repo docs validation:
cargo xtask docs allcargo xtask docs all validates repo-native docs by default. Use cargo xtask docs all --with-wiki or cargo xtask docs wiki when you want external wiki validation as part of the local workflow. Use cargo wiki status to inspect the configured external checkout and cargo wiki verify to confirm it is clean and synchronized.
crates/site- Leptos app shell, routes, runtime mounting, theme CSScrates/desktop_runtime- desktop state, reducer, effects, shell components, registrycrates/desktop_app_contract- typed app/runtime contracts for module mount context, host commands, and lifecycle/eventscrates/desktop_tauri- Tauri desktop shell host crate/configuration (tauri.conf.json, capabilities, CLI hooks)crates/platform_host- API-first host contracts/types crate (Phase 1 migration foundation)crates/platform_host_web- browser (wasm32) implementations ofplatform_hostservices (app-state/cache/prefs/explorer)crates/apps/explorer- Explorer app UI cratecrates/apps/notepad- Notepad app UI cratecrates/apps/calculator- Calculator app UI cratecrates/apps/terminal- Terminal app UI cratedocs/- repo-native formal documentation artifacts (ADR/SOP/contracts/reference/assets) backing the wiki hubxtask/src/commands/docs/- docs command-family façade used bycargo xtask docsxtask/src/docs.rs+xtask/src/docs/- docs validation/audit module root plus split validation surfacesxtask/src/commands/- standardized project verification and developer workflow command families (cargo xtask ...)xtask/src/runtime/- shared xtask automation runtime (process execution, workflow recording, config loading, artifacts)tools/docs/wiki.toml- external wiki repo configuration (remote URL, default branch, recommended checkout path)