Build your first app
-
Generate the project. Run the following from the directory where you keep your projects. When prompted, use
hello-cosmicas the project name, or adjust thecdcommand to match the name you choose.cargo generate gh:pop-os/cosmic-app-template cd hello-cosmicPick a unique reverse-domain app ID such as
io.github.yourname.HelloCosmic. Enter your own description, an SPDX license identifier such asMIT, and the URL you plan to use for your repository. App template -
Run the starter app. This builds the project and opens its example window.
cargo run -
Make a visible change. Open
src/app.rs, findfn view, and change a visible string such as the example’s"Watch: "label on the first page. Close the window and runcargo runagain to see your edit.