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 gh:D-Brox/cosmic-generate-template
A justfile is included by default with common recipes used by other COSMIC projects. Install from casey/just.
just run
builds and runs the applicationjust run-logs
builds and runs the application with debug logsjust fmt
formats the codejust check
runs clippy on the project to check for linter warningsjust check-json
can be used by IDEs that support LSPjust spellcheck
checks the code for spelling mistakes
A second justfile is also included with packaging recipes:
just build-debug
andjust build-release
build the project with those respective profilesjust install
installs the project into the root systemjust install-local
installs the project in the user's home- Install project as a
deb
: runjust build-deb && sudo just install-deb
- Install project as an
rpm
: runjust build-rpm && sudo just install-rpm
just vendor
andjust build-vendored
creates a vendored tarball and compiles with vendored dependencies from that tarball, respectively
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