{"id":15723753,"url":"https://github.com/davidmhewitt/elementary-rust-example","last_synced_at":"2025-04-30T14:41:06.215Z","repository":{"id":74281993,"uuid":"600901243","full_name":"davidmhewitt/elementary-rust-example","owner":"davidmhewitt","description":"A sample of how to build an elementary OS application with Rust","archived":false,"fork":false,"pushed_at":"2025-04-29T03:35:40.000Z","size":678,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-29T04:36:00.748Z","etag":null,"topics":["elementaryos","granite","gtk4","gtk4-rs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidmhewitt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-12T23:13:11.000Z","updated_at":"2025-04-29T03:35:25.000Z","dependencies_parsed_at":"2023-11-07T00:33:36.098Z","dependency_job_id":"7c651b71-e497-4003-a420-3dc5096137fd","html_url":"https://github.com/davidmhewitt/elementary-rust-example","commit_stats":{"total_commits":452,"total_committers":5,"mean_commits":90.4,"dds":0.3252212389380531,"last_synced_commit":"71046b3405a7773cbb09219a5ebb5e944d66cabc"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmhewitt%2Felementary-rust-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmhewitt%2Felementary-rust-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmhewitt%2Felementary-rust-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmhewitt%2Felementary-rust-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidmhewitt","download_url":"https://codeload.github.com/davidmhewitt/elementary-rust-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251722800,"owners_count":21633017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elementaryos","granite","gtk4","gtk4-rs"],"created_at":"2024-10-03T22:13:15.071Z","updated_at":"2025-04-30T14:41:06.173Z","avatar_url":"https://github.com/davidmhewitt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/davidmhewitt/elementary-rust-example/main/data/icons/hicolor/128.svg\" width=\"64\"\u003e\n  \u003c/div\u003e\n  \u003ch1 align=\"center\"\u003eElementary Rust Example\u003c/h1\u003e\n  \u003cdiv align=\"center\"\u003eRust application template for elementary OS. \u003c/div\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg  src=\"https://github.com/davidmhewitt/elementary-rust-example/raw/main/data/screenshots/light.png\" alt=\"Screenshot\" width=\"400\"\u003e\n    \u003cimg  src=\"https://github.com/davidmhewitt/elementary-rust-example/raw/main/data/screenshots/dark.png\" alt=\"Screenshot Dark\" width=\"400\"\u003e\n\u003c/div\u003e\n\n## ❓ What is this?\n\nThis repository has all of the necessary boilerplate to build a GTK4 application against the elementary Flatpak Platform using the Granite 7 library.\n\nThe example code uses the `Granite.Placeholder` widget to show a welcome screen, supports the user's dark style preference, remembers the window size and state, uses a custom icon from a GResource file, sets up translations, and has some sample unit tests for the welcome view widget.\n\nYou are free to extend upon this template in any way you see fit.\n\n## 🛠️ Requirements\n\n* gettext\n* meson\n* libgranite-7-dev\n* libgtk-4-dev\n* rust \u003e= 1.64 (Install from [rustup](https://rustup.rs/) as the version available on elementary OS 7.0 is not new enough)\n\n## 🚀 Getting started\n\n```\ngit clone https://github.com/davidmhewitt/elementary-rust-example\ncd elementary-rust-example\nmeson setup build\ncd build\nninja\nninja install\nsrc/elementary-rust-example\n```\n\nTo regenerate translation files (run inside the build directory):\n```\nninja io.github.davidmhewitt.ElementaryRustExample-pot\nninja io.github.davidmhewitt.ElementaryRustExample-update-po\nninja extra-pot\nninja extra-update-po\n```\n\n## 🤖 GitHub Actions\n\nThis repository is set up with a number of actions to help the development process.\n\n* Dependabot is configured to update Rust dependencies in your Cargo files.\n* There is an action to test building a Flatpak package against the elementary runtime.\n* There is an action to test building the application outside of a Flatpak in an elementary Docker container.\n* Finally, there is action to update `cargo-sources.json` when your Cargo manifests change. This file lists the Cargo crates that `flatpak-builder` has to download before attempting an offline build in a container.\n\n## 🐞 Problems/Feature Requests?\n\nPlease open [an issue](https://github.com/davidmhewitt/elementary-rust-example/issues) if you find any problems or want to get support.\n\n## 📔 Other Resources\n\n* [GUI development with Rust and GTK 4](https://gtk-rs.org/gtk4-rs/stable/latest/book/)\n* [Granite Documentation](https://valadoc.org/granite-7/Granite.html) (for Vala, but still useful and relevant)\n* [granite-rs examples](https://github.com/davidmhewitt/granite-rs/tree/main/examples/src) (Granite demo partially re-implemented in Rust)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmhewitt%2Felementary-rust-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidmhewitt%2Felementary-rust-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmhewitt%2Felementary-rust-example/lists"}