{"id":15039623,"url":"https://github.com/relm4/relm4","last_synced_at":"2025-05-11T13:59:35.323Z","repository":{"id":36994351,"uuid":"374367008","full_name":"Relm4/Relm4","owner":"Relm4","description":" Build truly native applications with ease!","archived":false,"fork":false,"pushed_at":"2025-05-09T16:00:42.000Z","size":3082,"stargazers_count":1615,"open_issues_count":58,"forks_count":81,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-05-11T13:59:24.928Z","etag":null,"topics":["elm","gtk","gtk4","gui","hacktoberfest","native","relm","rust"],"latest_commit_sha":null,"homepage":"https://relm4.org","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Relm4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2021-06-06T13:26:26.000Z","updated_at":"2025-05-10T11:25:47.000Z","dependencies_parsed_at":"2023-01-17T12:45:39.453Z","dependency_job_id":"f3cd5ea8-5a9b-4063-8c00-6f0133a0941a","html_url":"https://github.com/Relm4/Relm4","commit_stats":{"total_commits":991,"total_committers":31,"mean_commits":"31.967741935483872","dds":"0.31180625630676084","last_synced_commit":"ea27f87b0150de44df92f65ba62415843ea20ec9"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relm4%2FRelm4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relm4%2FRelm4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relm4%2FRelm4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relm4%2FRelm4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Relm4","download_url":"https://codeload.github.com/Relm4/Relm4/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253576264,"owners_count":21930169,"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":["elm","gtk","gtk4","gui","hacktoberfest","native","relm","rust"],"created_at":"2024-09-24T20:43:28.045Z","updated_at":"2025-05-11T13:59:35.293Z","avatar_url":"https://github.com/Relm4.png","language":"Rust","readme":"\u003ch1\u003e\n  \u003ca href=\"https://relm4.org\"\u003e\n    \u003cimg src=\"assets/Relm_logo_with_text.png\" width=\"200\" alt=\"Relm4\"\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\n[![CI](https://github.com/Relm4/Relm4/actions/workflows/rust.yml/badge.svg)](https://github.com/Relm4/Relm4/actions/workflows/rust.yml)\n[![Matrix](https://img.shields.io/matrix/relm4:matrix.org?label=matrix%20chat)](https://matrix.to/#/#relm4:matrix.org)\n[![Relm4 on crates.io](https://img.shields.io/crates/v/relm4.svg)](https://crates.io/crates/relm4)\n[![Relm4 docs](https://img.shields.io/badge/rust-documentation-blue)](https://docs.rs/relm4/)\n[![Relm4 book](https://img.shields.io/badge/rust-book-fc0060)](https://relm4.org/book/stable/)\n![Minimum Rust version 1.75](https://img.shields.io/badge/rustc-1.75+-06a096.svg)\n[![dependency status](https://deps.rs/repo/github/Relm4/Relm4/status.svg)](https://deps.rs/repo/github/Relm4/Relm4)\n\nAn idiomatic GUI library inspired by [Elm](https://elm-lang.org/) and based on [gtk4-rs](https://crates.io/crates/gtk4). \nRelm4 is a new version of [relm](https://github.com/antoyo/relm) that's built from scratch and is compatible with [GTK4](https://www.gtk.org/) and [libadwaita](https://gitlab.gnome.org/GNOME/libadwaita).\n\n## Why Relm4\n\nWe believe that GUI development should be easy, productive and delightful.  \nThe [gtk4-rs](https://crates.io/crates/gtk4) crate already provides everything you need to write modern, beautiful and cross-platform applications.\nBuilt on top of this foundation, Relm4 makes developing more idiomatic, simpler and faster and enables you to become productive in just a few hours.\n\n## Our goals\n\n+ ⏱️ **Productivity**\n+ ✨ **Simplicity**\n+ 📎 **Outstanding documentation**\n+ 🔧 **Maintainability**\n\n## Documentation\n\n+ 📖 **[The Relm4 book](https://relm4.org/book/stable/)**\n+ 📜 **[Rust documentation](https://docs.rs/relm4/)**\n\n## Dependencies\n\nRelm4 depends on GTK4: [How to install GTK4 and Rust](https://gtk-rs.org/gtk4-rs/git/book/installation.html)\n\n## Ecosystem\n\n+ [relm4-macros](https://crates.io/crates/relm4-macros) - several macros for declarative UI definitions.\n+ [relm4-components](https://crates.io/crates/relm4-components) - a collections of reusable components.\n+ [relm4-icons](https://crates.io/crates/relm4-icons) - icons for your application.\n+ [relm4-template](https://github.com/Relm4/relm4-template) - a starter template for creating Relm4 applications in the Flatpak package format.\n+ [relm4-snippets](https://github.com/Relm4/vscode-relm4-snippets) - code snippets to speed up your development.\n\nUse this in to your `Cargo.toml`:\n\n```toml\n# Core library\nrelm4 = \"0.9\"\n# Optional: reusable components\nrelm4-components = \"0.9\"\n# Optional: icons (more info at https://github.com/Relm4/icons)\nrelm4-icons = \"0.9.0\"\n```\n\n### Features\n\nThe `relm4` crate has four feature flags:\n\n| Flag | Purpose | Default |\n| :--- | :------ | :-----: |\n| `macros` | Enable macros by re-exporting [`relm4-macros`](https://crates.io/crates/relm4-macros) | ✅ |\n| `libadwaita` | Improved support for [libadwaita](https://gitlab.gnome.org/World/Rust/libadwaita-rs) | - |\n| `libpanel` | Improved support for [libpanel](https://gitlab.gnome.org/World/Rust/libpanel-rs) | - |\n| `gnome_46` | Enable all version feature flags of all dependencies to match the GNOME 46 SDK | - |\n| `gnome_45` | Enable all version feature flags of all dependencies to match the GNOME 45 SDK | - |\n| `gnome_44` | Enable all version feature flags of all dependencies to match the GNOME 44 SDK | - |\n| `gnome_43` | Enable all version feature flags of all dependencies to match the GNOME 43 SDK | - |\n| `gnome_42` | Enable all version feature flags of all dependencies to match the GNOME 42 SDK | ✅ |\n\nThe `macros` feature is a default feature.\n\n## Examples\n\nSeveral example applications are available at [examples/](examples/).\n\n#### [📸 Screenshots from the example apps](assets/screenshots)\n\n### A simple counter app\n\n![Simple app screenshot light](assets/screenshots/simple-light.png)\n![Simple app screenshot dark](assets/screenshots/simple-dark.png)\n\n```rust\nuse gtk::prelude::*;\nuse relm4::prelude::*;\n\nstruct App {\n    counter: u8,\n}\n\n#[derive(Debug)]\nenum Msg {\n    Increment,\n    Decrement,\n}\n\n#[relm4::component]\nimpl SimpleComponent for App {\n    type Init = u8;\n    type Input = Msg;\n    type Output = ();\n\n    view! {\n        gtk::Window {\n            set_title: Some(\"Simple app\"),\n            set_default_size: (300, 100),\n\n            gtk::Box {\n                set_orientation: gtk::Orientation::Vertical,\n                set_spacing: 5,\n                set_margin_all: 5,\n\n                gtk::Button {\n                    set_label: \"Increment\",\n                    connect_clicked =\u003e Msg::Increment,\n                },\n\n                gtk::Button {\n                    set_label: \"Decrement\",\n                    connect_clicked =\u003e Msg::Decrement,\n                },\n\n                gtk::Label {\n                    #[watch]\n                    set_label: \u0026format!(\"Counter: {}\", model.counter),\n                    set_margin_all: 5,\n                }\n            }\n        }\n    }\n\n    // Initialize the component.\n    fn init(\n        counter: Self::Init,\n        root: Self::Root,\n        sender: ComponentSender\u003cSelf\u003e,\n    ) -\u003e ComponentParts\u003cSelf\u003e {\n        let model = App { counter };\n\n        // Insert the code generation of the view! macro here\n        let widgets = view_output!();\n\n        ComponentParts { model, widgets }\n    }\n\n    fn update(\u0026mut self, msg: Self::Input, _sender: ComponentSender\u003cSelf\u003e) {\n        match msg {\n            Msg::Increment =\u003e {\n                self.counter = self.counter.wrapping_add(1);\n            }\n            Msg::Decrement =\u003e {\n                self.counter = self.counter.wrapping_sub(1);\n            }\n        }\n    }\n}\n\nfn main() {\n    let app = RelmApp::new(\"relm4.example.simple\");\n    app.run::\u003cApp\u003e(0);\n}\n```\n\n## Projects using Relm4\n\n- [fm](https://github.com/euclio/fm) — A small, general-purpose file manager.\n- [Done](https://github.com/edfloreshz/done) - A simple and versatile to do app.\n- [Reovim](https://github.com/songww/reovim) - GUI frontend for neovim.\n- [NixOS Configuration Editor](https://github.com/vlinkz/nixos-conf-editor) - A graphical configuration editor for [NixOS](https://nixos.org).\n- [Rhino Setup](https://github.com/rhino-linux/rhino-setup) - Setup wizard for [Rolling Rhino](https://rhinolinux.org/)\n- [Lemoa](https://github.com/lemmy-gtk/lemoa) - Desktop client for Lemmy\n- [Score Tracker](https://github.com/weclaw1/score-tracker) - App for tracking player scores in card and board games\n- [Spidey](https://github.com/kdwk/Spidey) - A seamless and distraction-free work and play environment on the web\n- [Toolbox Tuner](https://github.com/13hannes11/toolbox-tuner) - An application to manage Toolbx containers\n- [BitRitter](https://codeberg.org/Chfkch/bitritter) - A bitwarden/vaultwarden client with mobile devices in mind\n- [Space Acres](https://github.com/autonomys/space-acres) - An opinionated GUI application for farming on Autonomys Network\n- [Exercise Timer](https://github.com/mfep/exercise-timer) - An interval training app for the GNOME desktop\n- [Words!](https://codeberg.org/petsoi/words) - [on Flathub](https://flathub.org/apps/page.codeberg.petsoi.words) - A word game similar to Wordle\n- [LACT](https://github.com/ilya-zlobintsev/lact) - A GPU configuration and info utility\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n\n**Feedback and contributions are highly appreciated!**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelm4%2Frelm4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelm4%2Frelm4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelm4%2Frelm4/lists"}