libbhoo
Rust UI toolkit
Open-source mobile Linux
SpectreOS is an open-source mobile Linux operating system, Wayland compositor/shell, UI toolkit, native application suite and Android compatibility stack, organised as one monorepo around a Rust toolkit called libbhoo.
# clone, then use the unified app commands
$ git clone --recurse-submodules \
https://github.com/spectre-oss/spectreos.git
$ cd spectreos
$ cargo app-check all
$ cargo app-run settings # Wayland preview window
$ make -C codes/libs/ui/libbhoo run-launcher
Architecture
From the phone's operating system up to the apps in your hand. Wisp and every native app are drawn by libbhoo.
Mobile NixOS port for the Xiaomi Pocophone F1 (beryllium): mainline SDM845 kernel with device patches, firmware verification and flashing scripts. Experimental.
Unified Wayland compositor on an embedded Smithay: DRM/KMS, GBM, EGL/GLES3 and libinput. System UI, lock screen, launcher, multitasking and the notification service.
Immediate-mode-inspired Rust UI toolkit with analytical motion, Material Design 3 components, an Android XML runtime, and GLES 3.0, Wayland and WebAssembly backends.
Rust programs written against libbhoo.
Components & releases
Each component has its own version and release tag. The badge shows the version in source today; the line beneath is the latest GitHub release, fetched live.
Rust UI toolkit
Wayland compositor & shell
Wayland on-screen keyboard
System Settings
File manager & chooser
Calendar (embedded in Wisp)
Mobile NixOS port for beryllium
Release downloads come from GitHub Releases. How releases work →
libbhoo
The Cargo package is libbhoo; the Rust API is imported as bhoo. This is the repository's own launcher example, verbatim.
[dependencies]
libbhoo = { version = "0.2", features = ["wayland"] }Or run cargo add libbhoo --features wayland. The wayland feature adds the native window and the OpenGL ES 3.0 renderer.
cd codes/libs/ui/libbhoo
make run-launcher
# or, directly:
cargo run --release --features wayland --example launcherexamples/launcher.rsuse bhoo::window::{self, FrameAction, WindowOptions};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let smoke_test = std::env::args().any(|arg| arg == "--smoke-test");
let mut clicks = 0;
let mut frames = 0;
let options = WindowOptions {
title: "Bhoo · SpectreOS".into(),
size: [440, 360],
capture: std::env::var_os("BHOO_CAPTURE").map(Into::into),
..WindowOptions::default()
};
window::run(options, move |frame| {
frames += 1;
frame.label("Bhoo / SpectreOS");
frame.label("Wayland + OpenGL ES 3");
if frame.button(1, "Say bhoo!").clicked {
clicks += 1;
}
frame.label(format!("Ghosts summoned: {clicks}"));
if frame.button(2, "Close window").clicked || (smoke_test && frames >= 4) {
FrameAction::Exit
} else if smoke_test {
FrameAction::Redraw
} else {
FrameAction::Wait
}
})
}Requires Linux, a Wayland compositor, EGL with OpenGL ES 3.0+, libxkbcommon and a TTF/OTF font. Read the full guide →
Native apps
Wayland on-screen keyboard with English, Persian (ZWNJ half-space), Terminal and Emoji layouts, controlled over D-Bus as org.spectreos.OSK0.
Android 13 / AOSP-style System Settings, kept in sync with ~/.config/wisp/ so the standalone app and Wisp agree.
File manager and XDG file chooser with Trash, recursive search, image previews and ZIP support.
Day, Week, Month and Agenda views, recurring events, reminders and iCalendar import/export, embedded in Wisp.
WebAssembly playground and a side-by-side comparison with Angular Material, served locally.
Native apps are Rust plus libbhoo. Learn the layout, Cargo commands, browser debugger and latency rules.
Everything here is generated from the documentation in the repository.
↑↓ navigate↵ open/ or Ctrl+K to search anywhere