TUI rewrite (the visible half of the change): - 8 views instead of 6: Home, Search, Info, Install, Build, Query, Remove, Updates — central VIEW_ORDER const in tui/views/mod.rs and cycle_view() / parent_view() helpers mean adding a 9th view is one line. - Help overlay is now view-scoped: shows a Global section and an In this view section that only lists keybindings the current view actually honors. - Esc goes back one view (parent_view map); q still quits. - New ConfirmAction enum and full-screen confirm_banner widget: pressing i / b / r / U now sets pending_confirm and shows a banner; y confirms, n cancels. - TUI build routed through the canonical fetch_aur_to_store + validate_git_target instead of an inline git clone. The 6 swallowed errors are now surfaced in build_log and status_message. - panic-catching wrapper around spawn_action so a panic in the worker thread becomes a visible ActionUpdate instead of a frozen spinner. - TUI cancel architecture: Arc<Mutex<Option<Child>>> shared between parent and worker drainer, Arc<AtomicBool> cancel flag, c keypress in Install/Build views calls child.kill(). - Terminal too-small guard: < 14 rows or < 40 cols renders a Terminal too small overlay instead of broken layout. - Sticky error coloring in the status bar: success uses theme.success, failure uses theme.error, neutral uses status_style. - PgUp / PgDn global scroll bindings for Install/Build log views; scroll position tracked in install_log_scroll / build_log_scroll u16 fields; install_log_joined / build_log_joined pre-joined strings avoid repeated Vec<String>::join calls during render. - CubApp::new() returns Result<Self, CubError>; HOME missing or store.init() failure is now a fatal error overlay instead of a silent /tmp/.cub fallback. AUR hardening: - AUR client (reqwest::blocking::Client) gets 5s connect + 15s request timeouts. - fetch_aur_to_store writes the recipe atomically: stage in store.tmp_dir()/recipe-staging-<name>-<nanos>, then fs::rename. TmpGuard drop cleans up the clone directory. - validate_git_target rejects names with .., ://, leading -, empty, or NUL bytes (was previously only catching leading -). - redox-pkg dependency pinned to rev 52f7930f8e6dfbe85efd115b3848ea802e1a56f0 to match the resolved Cargo.lock. God-module split (main.rs 2063 -> 1723 lines): - constants.rs: 10 path / URL constants. - bur_helpers.rs: search_cached_bur, ensure_bur_package_dir, sync_bur_repo, default_bur_repo_url, bur_repo_dir, aur_repo_url, BurMatch struct. - fs_helpers.rs: find_stage_dir, directory_has_entries, copy_dir_recursive, remove_dir_if_exists, current_unix_timestamp, join_strings, join_package_names, empty_if_blank, yes_no. - paths.rs: cub_temp_dir, validate_git_target. Tests: - 19 unit tests in main-side modules (was 5); 121 in the lib (unchanged). Total 140/140 pass. - New CubError variant tests, validate_git_target happy-path + 4 attack vectors, cub_temp_dir unique-name under concurrent calls, bur_repo_dir / aur_repo_url composition, fs_helpers round-trips with tempfile scratch dirs. Policy: - local/AGENTS.md gains a TUI CONVENTION section: single binary, -i flag, no separate -tui crate, ratatui 0.30 + termion 4.0.6, anti-pattern list. cub, redbear-info, and redbear-netctl-console are listed as already compliant. - cubl (the cub lib-only consumer) recipe path updated from -p cub-cli to -p cub. Verified: cargo build --workspace and --no-default-features and --features full and --features tui all clean; cargo test --workspace 140/140 pass; cub --version cub 0.2.3; cub --help 21 subcommands.
Red Bear OS
A microkernel operating system written in Rust, derived from Redox OS
What is Red Bear OS?
Red Bear OS is a general-purpose, Unix-like operating system with a microkernel architecture, written in Rust. It is a full fork of Redox OS, with added hardware support, filesystem drivers, and a KDE Plasma desktop path. The current development branch is 0.2.3 and the current Red Bear OS version is 0.2.3 (same as the branch name).
Goals:
- AMD & Intel parity — first-class support for both platforms on bare metal
- KDE Plasma desktop — Wayland-based desktop environment via the KWin compositor
- Hardware GPU acceleration — AMD GPU (amdgpu) and Intel GPU drivers via
redox-drm - Modern subsystems — USB, Wi‑Fi, Bluetooth, ext4, GRUB, D-Bus
- Offline-first builds — reproducible from archived, BLAKE3-verified sources
Quick Start
Prerequisites
Linux x86_64 host with Rust nightly, QEMU, nasm, and standard build tools.
See the Redox Build Guide for full setup.
Build & Run
# Clone
git clone https://gitea.redbearos.org/vasilito/RedBear-OS.git
cd RedBear-OS
# Build and run the desktop target in QEMU
./scripts/run.sh --build
# Build a live ISO for bare metal
./scripts/build-iso.sh redbear-full
# Build the text-only recovery target
./scripts/run.sh --build --config redbear-mini
Repository Hosting
The canonical Red Bear OS Git server is Gitea at
https://gitea.redbearos.org/vasilito/RedBear-OS.git. GitHub is not a Red Bear OS source of
truth and must not be used for pushes, issues, releases, or project coordination.
Public Scripts
| Script | Purpose |
|---|---|
scripts/run.sh |
Build and run in QEMU (-b to build, -c <config> for target) |
scripts/build-iso.sh |
Build a live ISO for bare-metal boot |
scripts/build-all-isos.sh |
Build all live ISO targets |
scripts/network-boot.sh |
PXE network boot helper |
scripts/dual-boot.sh |
Dual-boot installation helper |
Config Targets
| Target | Type | Description |
|---|---|---|
redbear-full |
Desktop | Wayland + KDE + GPU drivers + D-Bus services |
redbear-mini |
Console | Text-only recovery / install target |
redbear-grub |
Console | Text-only with GRUB boot manager |
Current Status
Red Bear OS boots to a login prompt in QEMU with working wired networking, D-Bus system bus, hardware detection daemons, and filesystem support (RedoxFS, ext4, FAT).
| Area | Status |
|---|---|
| Boot (ACPI/x2APIC/SMP) | ✅ Bare-metal proven |
| Userspace drivers (PCI, storage, net) | ✅ Working in QEMU |
| D-Bus system bus + services | ✅ Working (login1, PolicyKit, UDisks, UPower) |
| ext4 / FAT filesystems | ✅ Compiles, installer-wired |
| POSIX gaps (relibc) | 🚧 Bounded Wayland-facing support |
| DRM/KMS display drivers | 🚧 AMD + Intel compile; HW validation pending |
| Wayland compositor | 🚧 Bounded proof; Qt6/KF6 clients crash at init |
| KDE Plasma desktop | 🔄 In progress (Qt6/KF6 compile; KWin/QML blocked) |
| Wi‑Fi / Bluetooth | 📋 Planned (architected, implementation pending) |
How It Works
Red Bear OS uses a userspace driver model — all drivers run as unprivileged daemons:
Kernel (microkernel)
└── schemes: memory, irq, event, pipe, debug
└── Driver daemons (userspace)
├── pcid → PCI enumeration
├── e1000d → Intel ethernet
├── xhcid → USB controller
└── vesad → Display framebuffer
The kernel provides minimal services (memory, interrupts, IPC). Everything else — filesystems, networking, graphics, input — runs in userspace.
Documentation
- Implementation Plan — roadmap and execution model
- Desktop Path Plan — kernel → DRM → Mesa → Wayland → KDE
- D-Bus Integration — session bus architecture
- USB Plan — USB stack design
- Wi‑Fi Plan — wireless architecture
- Bluetooth Plan — BT stack design
- Documentation Index — full doc map
Contributing
Red Bear OS uses a full fork model. Upstream Redox sources are frozen and archived. All custom work lives in local/:
local/
├── sources/ # Red Bear source forks (git repos, directly editable)
├── recipes/ # Custom packages (drivers, GPU, system)
├── docs/ # Integration and planning docs
└── scripts/ # Build, test, and release tooling
We welcome contributions made with or without AI assistance — we care about quality, not how the code was produced.
License
MIT — same as upstream Redox OS.