Open-source mobile Linux

A mobile Linux stack, from compositor to keyboard.

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.

Get started Download releases
  • GLES 3.0
  • Wayland
  • WASM
  • Material 3
  • Android XML
  • GPL-3.0-only

Architecture

One stack, four layers

From the phone's operating system up to the apps in your hand. Wisp and every native app are drawn by libbhoo.

  1. 01

    Spectre NixOS · Poco F1

    Mobile NixOS port for the Xiaomi Pocophone F1 (beryllium): mainline SDM845 kernel with device patches, firmware verification and flashing scripts. Experimental.

    Mobile NixOSSDM845aarch64

  2. 02

    Wisp

    Unified Wayland compositor on an embedded Smithay: DRM/KMS, GBM, EGL/GLES3 and libinput. System UI, lock screen, launcher, multitasking and the notification service.

    SmithayDRM/KMSFreedesktop

  3. 03

    libbhoo

    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.

    RustGLES 3.0Material 3

  4. 04

    Native apps

    Rust programs written against libbhoo.

    KeyboardSettingsFilesCalendar

Components & releases

Versioned independently

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.

cratev0.2.0

libbhoo

Rust UI toolkit

Checking GitHub releases…
appv0.2.1

Wisp

Wayland compositor & shell

Checking GitHub releases…
appv0.2.1

Keyboard

Wayland on-screen keyboard

Checking GitHub releases…
appv0.2.0

Settings

System Settings

Checking GitHub releases…
appv0.2.0

Files

File manager & chooser

Checking GitHub releases…
embedded appv0.2.0

Calendar

Calendar (embedded in Wisp)

Checking GitHub releases…

Release downloads come from GitHub Releases. How releases work →

libbhoo

A small UI toolkit with a real window

The Cargo package is libbhoo; the Rust API is imported as bhoo. This is the repository's own launcher example, verbatim.

Add it to a crate

toml
[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.

Run the example

sh
cd codes/libs/ui/libbhoo
make run-launcher
# or, directly:
cargo run --release --features wayland --example launcher
  • GLES 3.0
  • Wayland
  • WASM
  • Material 3
  • Android XML
  • GPL-3.0-only

examples/launcher.rs

rust
use 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

Built on the same toolkit

Keyboard

Wayland on-screen keyboard with English, Persian (ZWNJ half-space), Terminal and Emoji layouts, controlled over D-Bus as org.spectreos.OSK0.

Settings

Android 13 / AOSP-style System Settings, kept in sync with ~/.config/wisp/ so the standalone app and Wisp agree.

Files

File manager and XDG file chooser with Trash, recursive search, image previews and ZIP support.

Calendar

Day, Week, Month and Agenda views, recurring events, reminders and iCalendar import/export, embedded in Wisp.

Bhoo web demos

WebAssembly playground and a side-by-side comparison with Angular Material, served locally.

Write your own

Native apps are Rust plus libbhoo. Learn the layout, Cargo commands, browser debugger and latency rules.

Read the docs, build the stack.

Everything here is generated from the documentation in the repository.