https://github.com/bodil/vgtk Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} bodil / vgtk Public * Notifications * Fork 31 * Star 859 A declarative desktop UI framework for Rust built on GTK and Gtk-rs bodil.lol/vgtk/ License View license 859 stars 31 forks Star Notifications * Code * Issues 16 * Pull requests 9 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 12 branches 6 tags Code Latest commit @bodil bodil Update README.md ... 6c152c3 Feb 16, 2022 Update README.md 6c152c3 Git stats * 172 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows cache windows CI deps Dec 1, 2020 examples Merge remote-tracking branch 'origin/dependabot/cargo/strum-0.20' Nov 28, 2020 macros Fix cargo test complaint about extern crate. Jan 10, 2021 media README and etc. Nov 12, 2019 vgtk Add Image::surface property Mar 14, 2021 .gitignore Convert gtk! to a proc macro. Oct 17, 2019 CHANGELOG.md Release v0.3.0 Jul 5, 2020 Cargo.toml Move examples into separate projects and introduce logging. Oct 25, 2019 LICENSE.md More docs. Jan 31, 2020 README.md Update README.md Feb 16, 2022 clippy.toml Include Gtk setup for Clippy build. Oct 17, 2019 View code [ ] vgtk At A Glance Documentation Show Me! Installation Getting Started Examples Licence README.md vgtk A declarative desktop UI framework for Rust built on GTK and Gtk-rs. At A Glance * A clean, functional component model inspired by the Elm architecture, Redux and Yew. * A declarative DSL for composing GTK widgets inspired by React and JSX, using virtual "DOM" diffing for efficient updates. * Fully cross platform with a native look and feel for Linux, Windows and macOS. * Built on Rust's Futures using GLib's event loop, giving you async /await superpowers cleanly integrated with the GTK event model. * Absolutely no need for an embedded browser engine, unless you really want one. Documentation * API docs (latest release) * Tutorial Show Me! [inc] use vgtk::{ext::*, gtk, run, Component, UpdateAction, VNode}; use vgtk::lib::{gtk::*, gio::ApplicationFlags}; #[derive(Clone, Default, Debug)] struct Model { counter: usize, } #[derive(Clone, Debug)] enum Message { Inc, Exit, } impl Component for Model { type Message = Message; type Properties = (); fn update(&mut self, message: Message) -> UpdateAction { match message { Message::Inc => { self.counter += 1; UpdateAction::Render } Message::Exit => { vgtk::quit(); UpdateAction::None } } } fn view(&self) -> VNode { gtk! {