A cargo-generate
template for developing applications and applets for the COSMIC™ desktop environment.
# Install cargo-generate
cargo install cargo-generate
# Create your project using this template
cargo generate --git https://github.com/D-Brox/cosmic-generate-template
A justfile is included by default with common recipes used by other COSMIC projects. Install from casey/just.
just
builds the application with the defaultjust build-release
recipejust run
builds and runs the applicationjust install
installs the project into the systemjust vendor
creates a vendored tarballjust build-vendored
compiles with vendored dependencies from that tarballjust check
runs clippy on the project to check for linter warningsjust check-json
can be used by IDEs that support LSP
A second justfile is also included with packaging recipes:
deb
: runjust build-deb
andsudo just install-deb
rpm
: runjust build-rpm
andsudo just install-rpm
aur
: runjust build-aur
andsudo just install-aur
flatpak
: runjust install-flatpak
(requiresflatpak-builder
)
Refer to the libcosmic API documentation and book for help with building applications with libcosmic.
This template is based on:
- The official Cosmic App Template
- edfloreshz's Cosmic Applet Template