{"id":30577021,"url":"https://github.com/zhukmax/efx","last_synced_at":"2025-10-26T01:42:37.198Z","repository":{"id":309481189,"uuid":"1036432905","full_name":"ZhukMax/efx","owner":"ZhukMax","description":"🦀 Rust XML Template Engine for egui-based frameworks","archived":false,"fork":false,"pushed_at":"2025-08-27T18:05:04.000Z","size":239,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-27T18:34:58.801Z","etag":null,"topics":["bevy","eframe","egui","gui","proc-macro","rust","rust-library","templating","templating-engine","ui-components","wgpu-rs","winit"],"latest_commit_sha":null,"homepage":"https://efxui.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZhukMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-08-12T04:32:33.000Z","updated_at":"2025-08-27T17:23:19.000Z","dependencies_parsed_at":"2025-08-12T06:36:47.322Z","dependency_job_id":"19c112bd-f91c-42b6-8ff0-0072ba4813eb","html_url":"https://github.com/ZhukMax/efx","commit_stats":null,"previous_names":["zhukmax/efx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ZhukMax/efx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhukMax%2Fefx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhukMax%2Fefx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhukMax%2Fefx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhukMax%2Fefx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZhukMax","download_url":"https://codeload.github.com/ZhukMax/efx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZhukMax%2Fefx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272607531,"owners_count":24963757,"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-08-29T02:00:10.610Z","response_time":87,"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":["bevy","eframe","egui","gui","proc-macro","rust","rust-library","templating","templating-engine","ui-components","wgpu-rs","winit"],"created_at":"2025-08-29T02:01:16.927Z","updated_at":"2025-10-26T01:42:37.188Z","avatar_url":"https://github.com/ZhukMax.png","language":"Rust","readme":"![EFX — Rust templating for egui/eframe](https://raw.githubusercontent.com/ZhukMax/efx/main/efx/docs/efx_cover.png)\n\n# EFx\n[![Crates.io](https://img.shields.io/crates/v/efx.svg?color=green)](https://crates.io/crates/efx)\n![Crates.io Version](https://img.shields.io/crates/v/efx-core?label=efx-core)\n![Crates.io Version](https://img.shields.io/crates/v/efx-attrnames?label=efx-attrnames\u0026color=red)\n[![MSRV](https://img.shields.io/badge/rustc-1.75%2B-blue.svg?logo=rust)](#)\n[![Docs.rs](https://docs.rs/efx/badge.svg)](https://docs.rs/efx)\n[![License](https://img.shields.io/crates/l/efx)](https://github.com/ZhukMax/efx/blob/main/LICENSE)\n![Crates.io Total Downloads](https://img.shields.io/crates/d/efx)\n\n**EFx** — Rust 🦀 XML Template Engine for  [egui](https://github.com/emilk/egui)-based frameworks: [eframe](https://github.com/emilk/egui/tree/master/crates/eframe), [bevy_egui](https://github.com/vladbat00/bevy_egui), [egui-winit](https://crates.io/crates/egui-winit), [egui-miniquad](https://github.com/not-fl3/egui-miniquad).\n`efx!` is a proc-macro for writing tiny XML-like UI snippets in `eframe/egui`. It converts short tags into `egui` calls.\n\n**Simplicity and Convenience — XML, 🚀 Speed and 🔐 Security — Rust**\n\n**Easy as HTML, Fast as C**\n\nYou can embed arbitrary Rust expressions inside braces (`{...}`).\n\n---\n\n### Install \u0026 import\n\nRequires `egui` (the project currently uses `egui 0.32`). Add to `Cargo.toml`:\n```toml\n[dependencies]\nefx = \"0.6\"\negui = \"0.32\" # or egui-based framework\n```\n\nInside this repo just import the macro:\n```rust\nuse efx::efx; // the macro\n```\n\n---\n\n### Documentation\nYou can see on web page https://docs.rs/efx or in files:\n\n- [Introduction](efx/docs/intro.md) ([🇫🇷 fr](efx/docs/fr/intro.md))\n- [Tags](efx/docs/tags.md) ([🇫🇷 fr](efx/docs/fr/tags.md))\n- [Guide](efx/docs/guide.md) ([🇫🇷 fr](efx/docs/fr/guide.md))\n\n---\n\n### Expression interpolation `{...}`\n\nInside tag content you can insert any Rust expression that implements `Display`:\n\n```rust\nlet a = 2;\nlet b = 3;\nefx!(ui, r#\"\u003cLabel\u003eSum: {a + b}\u003c/Label\u003e\"#);\n```\n\n#### Escaping braces\n\nTo print `{` or `}`, use double braces (same as `format!`):\n\n```rust\nefx!(ui, r#\"\u003cLabel\u003eLiterals: {{ and }}\u003c/Label\u003e\"#);\n```\n\n---\n\n### Errors \u0026 diagnostics\n\nAt compile time the macro parses your snippet; at runtime it shows readable diagnostics via `ui.Label(...)` when input is invalid:\n\n* **Unknown tag**\n  Output: `Unknown tag: \u003cTagName\u003e`\n\n* **Mismatched open/close tags**\n  Output: `Mismatched tags: \u003copen\u003e and \u003c/close\u003e`\n\n* **Interpolation count mismatch**\n  Happens if the parser found e.g. two `{expr}` parts but after processing the text there’s a different number of `{}` placeholders. Make the counts match.\n\n---\n\n### Current limitations\n\n* **Case-sensitive tag names.**\n* Interpolated expressions must implement `Display`.\n\n---\n\n### Roadmap \u0026 RFCs\n\n**TL;DR.** EFx is a minimalist XML DSL on top of `egui` that compiles to plain `ui.*` calls.\nThe next three releases focus on expressiveness and first-class examples across popular `egui` runtimes:\n\n* **0.7 — Themes \u0026 layouts:** lightweight style sheets, extended containers (`Tabs/Table` behind `extras`), perf \u0026 polish.\n\nThis plan is incremental and **non-breaking**; new features are opt-in. Priorities may change based on community feedback.\n\n👉 **Full RFC:** [EFX-0001 — Roadmap 0.5–0.7](efx/docs/rfcs/EFX-0001-roadmap-0.5-0.7.md)\n\n👉 **RFC index:** [RFC/README.md](efx/docs/rfcs/README.md)\n\n---\n\n### Supported `egui` runtimes\n\nEFx renders into any runtime that provides `\u0026mut egui::Ui`. We officially build examples for the following targets:\n\n**Tier-1**\n\n* `eframe` (native + wasm)\n* `bevy_egui` (native)\n* raw `winit+wgpu` (via `egui-winit` + `egui-wgpu`). [Wgpu](https://github.com/gfx-rs/wgpu) - a cross-platform, safe, pure-rust graphics API. It runs natively on Vulkan, Metal, D3D12, and OpenGL; and on top of WebGL2 and WebGPU on wasm. Follows WebGPU specification. With async/await API.\n\n**Tier-2 (compatible today; examples later / community support)**\n\n* `egui-miniquad` (for `macroquad/miniquad` overlays) - Relatively minimalistic API well suited for small to medium graphics projects. Supports multiple backends, including browser target.\n* `egui_sdl2_*` backends\n* `egui_glow` / `tao` (lower-level backends)\n\n### Quickstart (pick one)\n\n**A) eframe**\n\n```toml\n# Cargo.toml\n[dependencies]\nefx    = \"0.6\"\neframe = \"0.32\"\n```\n\n```rust\nuse eframe::egui;\nuse efx::efx;\n\negui::CentralPanel::default().show(ctx, |ui| {\n    efx!(ui, r#\"\u003cColumn\u003e\u003cLabel\u003eHello, EFx\u003c/Label\u003e\u003cSeparator/\u003e\u003c/Column\u003e\"#);\n});\n```\n\n**B) Bevy + bevy\\_egui**\n\n```toml\n# Cargo.toml\n[dependencies]\nefx       = \"0.6\"\nbevy      = \"0.16\"\nbevy_egui = \"0.36\"  # re-exports `egui`\n```\n\n```rust\nuse bevy_egui::{EguiPlugin, EguiContexts};\nuse efx::efx;\n\nbevy_egui::egui::Window::new(\"EFx\").show(egui_ctx.ctx_mut(), |ui| {\n    efx!(ui, r#\"\u003cRow\u003e\u003cLabel\u003eIt works\u003c/Label\u003e\u003c/Row\u003e\"#);\n});\n```\n\n\u003e Tip: import `egui` via `use bevy_egui::egui as egui;` to avoid version mismatches.\n\n**C) Raw winit + wgpu**\n\n```toml\n# Cargo.toml\n[dependencies]\nefx        = \"0.6\"\negui       = \"0.32\"\negui-winit = \"0.32\"\negui-wgpu  = \"0.32\"\nwinit      = \"0.30\"\nwgpu       = \"26.0\"\n```\n\nUse the example in `examples/winit_wgpu_min.rs` as a starting point.\n\n---\n\n### 🤝 Contributing\n\nWe welcome contributions from the community!  \nPlease read our [Contributing Guide](./CONTRIBUTING.md) for details on:\n- branching and PR rules,\n- issue creation and discussion process,\n- coding conventions and CI requirements.\n\n---\n\n### Changelog\nSee in file [Changelog.md](efx/Changelog.md)\n\n### Licence\nThe MIT License. Please see [License File](efx/LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhukmax%2Fefx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhukmax%2Fefx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhukmax%2Fefx/lists"}