{"id":35146729,"url":"https://github.com/ennis/kyute","last_synced_at":"2025-12-28T14:05:34.308Z","repository":{"id":45902936,"uuid":"474331606","full_name":"ennis/kyute","owner":"ennis","description":"Rust GUI framework","archived":false,"fork":false,"pushed_at":"2024-06-10T20:34:03.000Z","size":5140,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-10T23:33:18.020Z","etag":null,"topics":["gui","rust"],"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/ennis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-03-26T11:48:31.000Z","updated_at":"2024-06-10T20:34:07.000Z","dependencies_parsed_at":"2023-01-20T07:01:01.501Z","dependency_job_id":"b82a2f8d-3b45-453e-998c-7067654f4d2e","html_url":"https://github.com/ennis/kyute","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ennis/kyute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ennis%2Fkyute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ennis%2Fkyute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ennis%2Fkyute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ennis%2Fkyute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ennis","download_url":"https://codeload.github.com/ennis/kyute/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ennis%2Fkyute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28100631,"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","status":"online","status_checked_at":"2025-12-28T02:00:05.685Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gui","rust"],"created_at":"2025-12-28T14:02:32.528Z","updated_at":"2025-12-28T14:05:34.301Z","avatar_url":"https://github.com/ennis.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" width=\"128\" height=\"128\" src=\"data/logo_kyute2.png\"\u003e\n\nKyute GUI library\n========================================\n\nThis is a GUI library in Rust. Inspired by [druid](https://github.com/linebender/druid) and [moxie](https://github.com/anp/moxie).\n\nUses skia under the hood for rendering.\nCurrently **windows-only** because it's using DirectWrite for text rendering \u0026 paragraph layout.\n\nFeatures\n--------------------------\n* Compose widgets with mostly idiomatic and straightforward Rust code\n    * Few macros, designed to work well with autocomplete\n* The UI is transparently invalidated whenever a piece of state changes. No need for manual change detection and invalidation.\n* Widgets\n    * Buttons\n    * Drop downs (using native menus)\n    * Sliders\n    * Text line editor \u0026 validated text input\n    * Images (with async loading \u0026 hot-reloading)\n    * Scrollable areas\n    * Hierarchical table view\n    * Simple color picker (WIP)\n* Layouts\n    * A versatile grid layout container based on CSS grid   \n* Live editing of some literals (see below)\n\nExamples\n--------------------------\n\nCounter demo\n\n![Counter demo](docs/screenshots/counter.png)\n\n```rust\nuse kyute::{\n  application, composable,\n  shell::{\n    application::Application,\n    winit::{dpi::LogicalSize, window::WindowBuilder},\n  },\n  style,\n  text::{FontWeight, FormattedText},\n  widget::{grid::GridLayoutExt, BaseTextEdit, Button, Grid, Text, TextEdit, WidgetExt},\n  Alignment, Color, UnitExt, Widget, Window,\n};\nuse kyute_shell::text::FormattedTextExt;\nuse std::sync::Arc;\n\n// All functions creating widgets or using features like `#[state]` must be marked as `#[composable]`.\n#[composable]\nfn counter_demo() -\u003e impl Widget {\n  // Declare persistent state with `#[state]`.\n  // The value will be remembered between invocations of `counter_demo` at the same position in the call tree.\n  #[state] let mut counter = 0;\n\n  // Another way of writing the code above without closures:\n  //\n  //    let button_increment = Button::new(\"+\".to_string());\n  //    let button_decrement = Button::new(\"-\".to_string());\n  //    if button_increment.clicked() {\n  //        counter += 1;\n  //    }\n  //    if button_decrement.clicked() {\n  //        counter -= 1;\n  //    }\n  //\n\n  // Layout the widgets in a grid.\n  //\n  // Grids are the primary layout mechanism in kyute.\n  // They are modeled after the CSS Grid specification.\n\n  // 2 rows, 40px height.\n  // 2 flex columns, available space will be divided evenly among them\n  let mut grid = Grid::with_template(\"40px 40px / 1fr 1fr\");\n  grid.insert((\n    Text::new(format!(\"Counter value: {}\", counter).attribute(14.., FontWeight::BOLD))\n            .centered()\n            .grid_column_span(2),\n    // Buttons to increment and decrement the counter.\n    // The framework will detect if the value of `counter` changed, and will re-run the `counter_demo` function if this is the case.\n    // Note that the callback passed to `on_clicked` is run immediately, so you can borrow stuff from the surrounding scope.\n    Button::new(\"+\")\n            .on_click(|| counter += 1)\n            .padding(5.dip())\n            .horizontal_alignment(Alignment::END)\n            .vertical_alignment(Alignment::END),\n    Button::new(\"-\")\n            .on_click(|| counter -= 1)\n            .padding(5.dip())\n            .horizontal_alignment(Alignment::START)\n            .vertical_alignment(Alignment::END),\n  ));\n\n  grid.centered()\n          .frame(100.percent(), 100.percent())\n          .background(\"rgb(71 71 71)\", style::Shape::rectangle())\n          .text_color(Color::from_rgb_u8(200, 200, 200))\n}\n\n#[composable]\nfn main_window() -\u003e impl Widget {\n  // Create the main window widget.\n  // For now we use a fork of winit under the hood, hence the `WindowBuilder`.\n  Window::new(\n    WindowBuilder::new()\n            .with_title(\"Counter demo\")\n            .with_inner_size(LogicalSize::new(200, 100)),\n    counter_demo(),\n    None,\n  )\n}\n\nfn main() {\n  application::run(main_window);\n}\n```\n\nLive-editing of literals\n--------------------------\n\nKyute supports live-editing of some literal expressions in composable functions by adding the `#[composable(live_literals)]`.\nWhen this feature is active, the runtime detects changes in literal values in the source file containing the function, \nand recomposes the user interface automatically to reflect the most recent value.\nThis is especially powerful when combined with the support of CSS property values in some places:\n\n![Live literals demo](docs/screenshots/live_literals.gif \"live literals\")\n\nScreenshots\n--------------------------\n\nHierarchical table view\n\n![](docs/screenshots/table.png)\n\nText edit\n\n![](docs/screenshots/text_edit.png)\n\nColor picker\n\n![](docs/screenshots/color_picker.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fennis%2Fkyute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fennis%2Fkyute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fennis%2Fkyute/lists"}