{"id":15013131,"url":"https://github.com/tauri-apps/tauri-egui","last_synced_at":"2025-04-05T20:07:58.305Z","repository":{"id":65978598,"uuid":"522191910","full_name":"tauri-apps/tauri-egui","owner":"tauri-apps","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-22T10:08:56.000Z","size":1365,"stargazers_count":348,"open_issues_count":17,"forks_count":31,"subscribers_count":14,"default_branch":"dev","last_synced_at":"2024-10-29T15:44:12.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tauri-apps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.spdx","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}},"created_at":"2022-08-07T11:18:46.000Z","updated_at":"2024-10-14T20:52:54.000Z","dependencies_parsed_at":"2024-04-13T16:00:04.528Z","dependency_job_id":null,"html_url":"https://github.com/tauri-apps/tauri-egui","commit_stats":{"total_commits":65,"total_committers":7,"mean_commits":9.285714285714286,"dds":"0.41538461538461535","last_synced_commit":"0eafbeb72130e901bed17b41e522cc73985b8ec7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-egui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-egui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-egui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Ftauri-egui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauri-apps","download_url":"https://codeload.github.com/tauri-apps/tauri-egui/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247365786,"owners_count":20927400,"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":[],"created_at":"2024-09-24T19:43:47.099Z","updated_at":"2025-04-05T20:07:58.275Z","avatar_url":"https://github.com/tauri-apps.png","language":"Rust","funding_links":["https://opencollective.com/tauri"],"categories":[],"sub_categories":[],"readme":"# tauri-egui\n\n[![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri-egui/tree/dev)\n[![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https://opencollective.com/tauri)\n[![test library](https://img.shields.io/github/workflow/status/tauri-apps/tauri-egui/test%20library?label=test%20library)](https://github.com/tauri-apps/tauri/actions?query=workflow%3A%22test+library%22)\n[![Chat Server](https://img.shields.io/badge/chat-discord-7289da.svg)](https://discord.gg/SpmNs4S)\n[![website](https://img.shields.io/badge/website-tauri.app-purple.svg)](https://tauri.app)\n[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)\n[![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri)\n\n## Dependency\n\n| Component                                                                                    | Description                               | Version                                                                                                  |\n| -------------------------------------------------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------- |\n| [**tauri**](https://github.com/tauri-apps/tauri/tree/dev/core/tauri)                         | runtime core                              | [![](https://img.shields.io/badge/crate.io-v2.0.0--alpha.4-orange)](https://crates.io/crates/tauri)                         |\n| [**egui**](https://github.com/tauri-apps/egui) | immediate mode GUI library for Rust  | [![](https://img.shields.io/badge/crate.io-v0.19.0-orange)](https://crates.io/crates/egui) |\n| [**tao**](https://github.com/tauri-apps/tao) | cross-platform application window creation library in Rust  | [![](https://img.shields.io/badge/crate.io-v0.18.0-orange)](https://crates.io/crates/tao) |\n| [**glutin**](https://github.com/tauri-apps/glutin) | low-level library for OpenGL context creation, written in pure Rust.  | [![](https://img.shields.io/badge/crate.io-v0.29.1-orange)](https://crates.io/crates/glutin) |\n\n## About tauri-egui\n\n`tauri-egui` is a Tauri plugin for using the [`egui library`](https://github.com/emilk/egui) in a Tauri application via [`glutin`](https://github.com/tauri-apps/glutin). `egui` is a pure Rust GUI library that runs natively, recommended by the Tauri team for secure contexts such as password and secret interfaces.\n\n## Example\n\n```rust\nuse tauri::Manager;\nuse tauri_egui::{eframe, egui, EguiPluginBuilder, EguiPluginHandle};\n\nstruct LoginApp {\n  password: String,\n  on_submit: Box\u003cdyn Fn(\u0026str) -\u003e bool + Send\u003e,\n}\n\nimpl LoginApp {\n  fn new\u003cF: Fn(\u0026str) -\u003e bool + Send + 'static\u003e(\n    ctx: \u0026eframe::CreationContext,\n    on_submit: F,\n  ) -\u003e Self {\n    Self {\n      password: \"\".into(),\n      on_submit: Box::new(on_submit),\n    }\n  }\n}\n\nimpl eframe::App for LoginApp {\n  fn update(\u0026mut self, ctx: \u0026egui::Context, frame: \u0026mut eframe::Frame) {\n    let LoginApp {\n      password,\n      on_submit,\n    } = self;\n    egui::CentralPanel::default().show(ctx, |ui| {\n      ui.label(\"Enter your password\");\n      let textfield = ui.add_sized(\n        [ui.available_width(), 24.],\n        egui::TextEdit::singleline(password).password(true),\n      );\n      let button = ui.button(\"Submit\");\n      if (textfield.lost_focus() \u0026\u0026 ui.input().key_pressed(egui::Key::Enter)) || button.clicked() {\n        if on_submit(password) {\n          frame.close();\n        }\n      }\n    });\n  }\n}\n\nfn main() {\n  tauri::Builder::default()\n    .setup(|app| {\n      app.wry_plugin(EguiPluginBuilder::new(app.handle()));\n      let egui_handle = app.state::\u003cEguiPluginHandle\u003e();\n\n      let native_options = eframe::NativeOptions {\n        drag_and_drop_support: true,\n        initial_window_size: Some([1280.0, 1024.0].into()),\n        ..Default::default()\n      };\n\n      let _window = egui_handle\n        .create_window(\n          \"native-window\".to_string(),\n          Box::new(|cc| Box::new(LoginApp::new(cc, |pwd| pwd == \"tauriisawesome\"))),\n          \"Login\".into(),\n          native_options,\n        )\n        .unwrap();\n\n      Ok(())\n    })\n    .run(tauri::generate_context!(\"examples/demo/tauri.conf.json\"))\n    .expect(\"error while building tauri application\");\n}\n```\n\n## Semver\n\n**tauri-egui** is following [Semantic Versioning 2.0](https://semver.org/).\n\n## Licenses\n\nCode: (c) 2019 - 2022 - The Tauri Programme within The Commons Conservancy.\n\nMIT or MIT/Apache 2.0 where applicable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-egui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauri-apps%2Ftauri-egui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Ftauri-egui/lists"}