App template
A minimal Atlas app to copy: a Kirigami window on Atlas.Ui, one Rust QObject exposed through CXX-Qt, built with CMake and Corrosion on the framework's crates.
The app template (template/ in the atlas-framework repository) is a minimal Atlas app: a QML interface compiled ahead of time by qt_add_qml_module, one Rust QObject exposed through CXX-Qt, built with CMake and Corrosion, on atlas-framework's Rust crates and the installed Atlas.Ui. The framework starts the app (app ID, one instance per session, journal logging, crash hooks) and Atlas.Ui gives it the look and an About page. It builds on its own: the template is not part of the framework's Cargo workspace.
What is in it
| File | What it is |
|---|---|
CMakeLists.txt |
Finds Qt 6.11, Corrosion and KF6, checks that Atlas.Ui is installed, builds the Rust crate and the executable, installs it. |
Cargo.toml, build.rs |
The Rust crate (a static library) and the CXX-Qt build step. |
main.cpp |
The only C++: one call to atlas_app_run. |
src/lib.rs |
Names the app with atlas_framework_ui::app! and exports atlas_backend_new(). |
src/backend.rs |
The Backend QObject: properties, invokables, a worker thread, a notification. |
qml/Main.qml, qml/MainPage.qml |
The window, and a page that shows many Atlas.Ui controls. |
data/ |
The desktop file and atlas-apptemplate.notifyrc, the notification events. |
Pages
- Start a new app: copy it and rename it.
- Build and run: packages, CMake, running headless.
- How it fits together: startup, the backend, QML, notifications, settings.
Pages
- Start a new appCopy the template into a new repository and rename the crate, QML module, app ID, desktop file, notification file and binary.
- Build and runThe Fedora 44 packages, the CMake commands and how to run the template without showing a window.
- How it fits togetherHow the template starts: app! in lib.rs, main.cpp, the Rust Backend QObject, Main.qml, the Atlas.Ui version check, notifications, settings and threads.