How cachyos/cachyos-welcome works
Project type and purpose
• This is a desktop-GUI “welcome screen” application for CachyOS, written in Rust and GTK.
• At runtime it displays welcome pages, handles user actions (e.g. install, open browser), and interacts with system services (ALPM/pacman, systemd, D-Bus).
File structure
• Top-level “src/” folder holds the Rust modules:
• main.rs, application.rs, window.rs, pages.rs, actions.rs
• helper modules: alpm_helper.rs, installer.rs, kwin_dbus.rs, systemd_units.rs
• support: localization.rs, logger.rs, utils.rs
• embed_data.rs and gresource.rs for packing JSON, images, Glade, CSS into the binary
• “ui/” contains cachyos-hello.glade and style.css
• “data/” contains JSON definitions for pages (under data/pages/<lang>), default settings, and images
• “i18n/” and “i18n.toml” hold Fluent translation files (.ftl)
• Build: Meson (meson.build, build-aux scripts), Cargo (Cargo.toml, build.rs), postinstall.sh, hooks, scripts/rootshell.sh
README
• Confirms it is the “CachyOS Welcome” screen, Rust+GTK, CI status
1. Build System
• Meson + Cargo + build.rs + build-aux scripts
• GResource compiler (embed UI/CSS/JSON/images)
2. Application Binary
• Rust runtime
• UI Loader (gtk::Builder)
• Controllers/Modules
• Actions Module
• Pages/Model Module
• Installer/ALPM Module
• Systemd & D-Bus Module
• Localization & Logger
3. Embedded Resources
• Glade UI file, CSS
• JSON page data, images
• Fluent .ftl translation files
4. External Services
• Package manager backend (pacman via ALPM)
• systemd (via D-Bus)
• KWin D-Bus for window management
• root-elevation scripts (rootshell.sh, terminal-helper)
• File system (preferences.json)
• Build System → Application Binary (produces executable + embedded resources)
• At runtime:
• Binary → GResource API → loads UI, CSS, JSON, images
• UI Layer ←→ Controller Modules (actions/pages)
• Controllers → Localization Module → fetch translated strings
• Installer Module → root shell script / ALPM helper → pacman
• Systemd Module → D-Bus API → systemd daemon
• KWin D-Bus Module → KWin → window placement
• Logger → writes to file/console
• Preferences JSON → read/write by Config module
c. Architectural patterns & principles:
• MVC-like separation:
• View = GTK UI (Glade)
• Model = pages.rs + embed_data.rs (JSON models)
• Controller = actions.rs, installer.rs, alpm_helper.rs
• Resource embedding for single-binary distribution
• Modularization by concern: localization, logging, system integration
• CI/CD via GitHub Actions, dependency management via Cargo/Meson
d. Key technologies/frameworks:
• Rust (Cargo, build.rs)
• GTK3/Glade (gtk::Builder, GResource)
• Meson build integration
• Fluent (FTL) for i18n
• pacman ALPM library bindings
• systemd & D-Bus crates
• Shell scripts for privileged operations