Build apps
Writing SpectreOS apps
Native SpectreOS apps must be written in Rust and use libbhoo for their user interface. The Cargo package is named libbhoo and its Rust API is imported as bhoo. libbhoo documentation
#Structure a native app
Keep each app in its own directory under codes/apps/<app>/ using the standard layout:
src/— owns the app's pages, navigation, and presentation state. When the app runs both inside Wisp and as a standalone Wayland client, share that code between the two entry points and let the host supply system data and execute actions requested by the UI (for example, Settings accepts aSettingsHostContextand returns aSettingsAction). Settings UI and host interface · Standalone entry pointassets/— stores the app's required Freedesktop Desktop Entry (org.spectreos.<App>.desktop) alongside icons, layouts, and static media.test/— stores the app's test suites and fixtures, includingtest/web-tests.jsonfor the debug-only browser workbench and future integration/UI/snapshot tests..cargo/config.toml— wires the uniform per-appcargo dev,cargo release,cargo app-test,cargo app-clean, andcargo test-webaliases.
#Chapters
- App structure, assets, and tests defines the required
codes/apps/<app>/directory layout,assets/org.spectreos.<App>.desktopFreedesktop entries,test/organization, and new-app checklist. - Cargo commands covers per-app and repo-wide
cargo dev,cargo release,cargo app-test,cargo app-clean, andcargo test-webworkflows. - Web debugging covers the debug-only WASM browser workbench, reusable test-case buttons (
test/web-tests.json), and live System Notification / D-Bus inspection. - Responsiveness covers the first frame, background work, caching, and measuring launch latency on the phone.