Skip to content
Merged

V0.6 #34

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
88c3196
Added Heading tag
ZhukMax Aug 31, 2025
0bf24f5
Fixed Heading tag
ZhukMax Aug 31, 2025
47b71dd
Added tags TopPanel, SidePanel, BottomPanel
ZhukMax Aug 31, 2025
68597d0
Refactoring panel tags, added panel utils
ZhukMax Aug 31, 2025
2f5b556
Added Resize tag, refactoring panel tags
ZhukMax Aug 31, 2025
adcad39
Fixed Resize tag
ZhukMax Aug 31, 2025
3729e2c
Added Window tag
ZhukMax Sep 1, 2025
3faee1d
Fixing bugs
ZhukMax Sep 1, 2025
a56b30e
Merge main into v0.6
ZhukMax Sep 2, 2025
cd2fb64
Fixed Window tag, updated sandbox
ZhukMax Sep 3, 2025
01ed474
Made lang syntax files
ZhukMax Sep 8, 2025
0780f97
Updated Readme
ZhukMax Sep 8, 2025
cf3ec6f
Updated Readme
ZhukMax Sep 8, 2025
0ec4ba3
Merge branch 'grammar' into v0.6
ZhukMax Sep 8, 2025
8c497b8
Added Image tag
ZhukMax Sep 8, 2025
8e4eac1
Refactoring: move traits to interfaces module
ZhukMax Sep 8, 2025
0631210
Added Panel tag
ZhukMax Sep 8, 2025
2f7cc79
Create intro.md
Rob-Parker Sep 9, 2025
f130a87
Added Contributing
ZhukMax Sep 9, 2025
f508909
Update intro.md
Rob-Parker Sep 9, 2025
920ad38
Update intro.md
Rob-Parker Sep 9, 2025
5ec7553
Merge pull request #6 from Rob-Parker/docs/fr
ZhukMax Sep 9, 2025
dfabb02
Create tags.md
Rob-Parker Sep 9, 2025
7f37387
Create guide.md
Rob-Parker Sep 9, 2025
a18fecd
Added Tabs&Tab tags
ZhukMax Sep 10, 2025
98ecf35
Merge pull request #7 from Rob-Parker/docs/fr
ZhukMax Sep 10, 2025
a9eddd7
Added Table, Tr and Td tags
ZhukMax Sep 11, 2025
830a82b
Added DataTable tag
ZhukMax Sep 11, 2025
d7e11d9
Added Grid tag
ZhukMax Sep 11, 2025
328ca8d
Refactoring
ZhukMax Sep 13, 2025
0be8055
Merge branch 'main' into v0.6
ZhukMax Sep 19, 2025
d80590e
Fixed DataTable
ZhukMax Oct 5, 2025
3639e8b
Update examples-build.yml
aravindan888 Oct 6, 2025
74bbf15
Updated Readme#Contributing
ZhukMax Oct 7, 2025
67064ca
Merge pull request #33 from aravindan888/main
ZhukMax Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/examples-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,13 @@ jobs:
with:
name: ${{ matrix.example }}-${{ matrix.target }}
path: target/wasm32-unknown-unknown/debug/examples/*.wasm

sandbox: #new sandbox job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Build efx-sandbox
run: cargo build -p efx-sandbox
106 changes: 106 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Contributing to EFx

Thank you for your interest in contributing!
Any help — from filing a bug report to implementing new tags — makes EFx better.

---

## Principles

* **Safety & compatibility.** Avoid breaking public APIs unless agreed upon in advance.
* **Code style.** Follow `cargo fmt` and ensure `clippy` passes without warnings.
* **Tests.** Any logic change should come with tests (`cargo test`, doctests, compile-fail tests).
* **Docs.** Public APIs, new tags, and attributes must be documented.
* **Performance.** Avoid regressions; add profiling notes if relevant.

---

## Filing Issues

Before opening a new issue:

1. **Search existing issues** to avoid duplicates.
2. Prepare a **minimal reproducible example** (short `efx! { ... }` snippet, log, or screenshot).

**Template for issues:**

* **Type:** bug / feature / docs / question
* **Expected behavior:** …
* **Actual behavior:** …
* **Reproduction:** code or steps
* **Versions:** `rustc --version`, EFx crate versions
* **Platform:** OS/architecture
* **Additional info:** backtrace, perf data, etc.

---

## Submitting Pull Requests

1. **Fork** and create a branch:

* `feat/<feature>` — new functionality
* `fix/<bug>` — bugfix
* `docs/<topic>` — docs only
* `chore/<topic>` — maintenance
2. Make your changes and ensure **all tests pass**.
3. Update **docs** and **CHANGELOG.md** if behavior is user-visible.
4. Run local checks (see below).
5. Open a PR with:

* **Title:** short and clear
* **Description:** what/why, how tested, API impact
* Link to relevant **issue or RFC**

Small follow-up commits for review fixes are welcome.

---

## Pre-PR Checklist

```bash
# formatting
cargo fmt --all -- --check

# linting
cargo clippy --all-targets --all-features -D warnings

# tests (unit, doctests, compile-fail)
cargo test --workspace

# docs build
cargo doc --workspace --no-deps
```

You can also check examples manually:

```bash
cargo run -p efx-sandbox
cargo run -p efx --example eframe_demo
```

---

## Commit Messages

Use [Conventional Commits](https://www.conventionalcommits.org/):

```
feat(button): add rounding attribute
fix(core): correct parsing of numeric attribute
docs: update intro example
```

---

## Versioning

We follow **SemVer**.
Breaking changes require discussion in an issue/RFC.
All user-facing changes should be added to `CHANGELOG.md` under **Unreleased**.

---

## License

By submitting a contribution, you agree that your work is licensed under the same terms as EFx
([MIT OR Apache-2.0](efx/LICENSE)).
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ dump: ## Make dump of project
! -path "./target/*" \
-exec sh -c 'echo ">>> START {}"; cat "{}"; echo ">>> END {}"; echo ""' \; > efx_code.dump.txt

sandbox: ## Run sandbox on local machine
@cargo run -p efx-sandbox

help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9\./_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
86 changes: 68 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
![EFX — Rust templating for egui/eframe](efx/docs/efx_cover.png)

# EFx
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![Crates.io](https://img.shields.io/crates/v/efx.svg)](https://crates.io/crates/efx)
[![Crates.io](https://img.shields.io/crates/v/efx.svg?color=green)](https://crates.io/crates/efx)
![Crates.io Version](https://img.shields.io/crates/v/efx-core?label=efx-core)
[![MSRV](https://img.shields.io/badge/rustc-1.85%2B-blue.svg)](#)
![Crates.io Version](https://img.shields.io/crates/v/efx-attrnames?label=efx-attrnames&color=red)
[![MSRV](https://img.shields.io/badge/rustc-1.75%2B-blue.svg?logo=rust)](#)
[![Docs.rs](https://docs.rs/efx/badge.svg)](https://docs.rs/efx)
[![License](https://img.shields.io/crates/l/efx)](https://github.com/ZhukMax/efx/blob/main/LICENSE)
![Crates.io Total Downloads](https://img.shields.io/crates/d/efx)

**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).
`efx!` is a proc-macro for writing tiny XML-like UI snippets in `eframe/egui`. It converts short tags into `egui` calls.

**Simplicity and Convenience — XML, 🚀 Speed ​​and 🔐 Security — Rust**
**Simplicity and Convenience — XML, 🚀 Speed and 🔐 Security — Rust**

**Easy as HTML, Fast as C**

Expand All @@ -25,7 +25,7 @@ You can embed arbitrary Rust expressions inside braces (`{...}`).
Requires `egui` (the project currently uses `egui 0.32`). Add to `Cargo.toml`:
```toml
[dependencies]
efx = "0.5"
efx = "0.6"
egui = "0.32" # or egui-based framework
```

Expand All @@ -39,9 +39,9 @@ use efx::efx; // the macro
### Documentation
You can see on web page https://docs.rs/efx/latest/efx/ or in files:

- [Introduction](efx/docs/intro.md)
- [Tags](efx/docs/tags.md)
- [Guide](efx/docs/guide.md)
- [Introduction](efx/docs/intro.md) ([🇫🇷 fr](efx/docs/fr/intro.md))
- [Tags](efx/docs/tags.md) ([🇫🇷 fr](efx/docs/fr/tags.md))
- [Guide](efx/docs/guide.md) ([🇫🇷 fr](efx/docs/fr/guide.md))

---

Expand Down Expand Up @@ -92,8 +92,6 @@ At compile time the macro parses your snippet; at runtime it shows readable diag
**TL;DR.** EFx is a minimalist XML DSL on top of `egui` that compiles to plain `ui.*` calls.
The next three releases focus on expressiveness and first-class examples across popular `egui` runtimes:

* **0.5 — Attributes & core tags:** type-checked attributes, `Heading`, `Hyperlink`, `Image`, `TextField`, `Grid`, plus `Window/CentralPanel/SidePanel`. Diagnostics & examples.
* **0.6 — Components & events:** reusable components/slots, event sugar (`onClick`, etc.), classes/presets, Bevy examples.
* **0.7 — Themes & layouts:** lightweight style sheets, extended containers (`Tabs/Table` behind `extras`), perf & polish.

This plan is incremental and **non-breaking**; new features are opt-in. Priorities may change based on community feedback.
Expand Down Expand Up @@ -127,7 +125,7 @@ EFx renders into any runtime that provides `&mut egui::Ui`. We officially build
```toml
# Cargo.toml
[dependencies]
efx = "0.5"
efx = "0.6"
eframe = "0.32"
```

Expand All @@ -145,7 +143,7 @@ egui::CentralPanel::default().show(ctx, |ui| {
```toml
# Cargo.toml
[dependencies]
efx = "0.5"
efx = "0.6"
bevy = "0.16"
bevy_egui = "0.36" # re-exports `egui`
```
Expand All @@ -166,7 +164,7 @@ bevy_egui::egui::Window::new("EFx").show(egui_ctx.ctx_mut(), |ui| {
```toml
# Cargo.toml
[dependencies]
efx = "0.5"
efx = "0.6"
egui = "0.32"
egui-winit = "0.32"
egui-wgpu = "0.32"
Expand All @@ -180,11 +178,63 @@ Use the example in `examples/winit_wgpu_min.rs` as a starting point.

### Contributing

* Start with the roadmap RFC: [EFX-0001](efx/docs/rfcs/EFX-0001-roadmap-0.5-0.7.md).
* You can write me with your ideas on [[email protected]](mailto:[email protected]).
* Open issues are grouped by milestones **0.5 / 0.6 / 0.7**.
* PRs that change behavior should reference the relevant RFC section.
* Looking for help with: Bevy example(s), raw `winit+wgpu` example, attribute codegen & compile-fail tests, `TextField` docs.
[![PRs Welcome](https://img.shields.io/badge/PullRequest-welcome-brightgreen.svg?style=flat-square)]()

**Thanks for considering a contribution!** Please follow this lightweight workflow:

#### 1) Pick or propose an issue

* **Claim an issue:** comment “I’d like to take this” (optionally add a brief plan/ETA).
The maintainer will assign it to you.
* **Propose a new issue:** open a ticket with a minimal reproducible example (for bugs) or a short rationale (for features).
Start with the roadmap RFC: [EFX-0001](efx/docs/rfcs/EFX-0001-roadmap-0.5-0.7.md).

> Tip: issues labeled `good first issue` are designed for first-time contributors.

#### 2) Fork & branch

* Fork the repository and create a **feature branch from `main`**:

```bash
git checkout main
git pull
git checkout -b feat/short-topic
```
* Keep your branch focused on **one issue**.

#### 3) Implement with tests & docs

* Make the change and add tests/docs where it makes sense.
* Local checks (examples build-only; no GUI run is required):

```bash
cargo fmt --all
cargo clippy --all-targets -- -D warnings
cargo build --workspace --locked
cargo build -p efx --example eframe_demo --locked
rustup target add wasm32-unknown-unknown
cargo build -p efx --example eframe_demo --target wasm32-unknown-unknown --locked
```

#### 4) Open a Pull Request

* Target the **next release branch** (e.g., `v0.6`, `v0.7`).
If the issue has a **milestone**, use the branch named after that milestone.
* Link the issue (e.g., “Closes #123”) and fill the checklist below.

**PR checklist**

* [ ] References the related issue / RFC section when behavior changes.
* [ ] CI is green (workspace build, examples, wasm32 build-only).
* [ ] Tests/docs updated where applicable.
* [ ] No unrelated changes.

#### 5) Reviews & merge

* Address review comments; small, focused PRs get merged faster.
* If you go silent for **7 days**, the issue may be unassigned to keep momentum (you can re-claim it anytime).

**Questions?** Reach out at [[email protected]](mailto:[email protected]).

---

Expand Down
2 changes: 2 additions & 0 deletions efx-core/src/doc_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ impl Ui {
#[inline]
pub fn label<T>(&mut self, _text: T) {}
#[inline]
pub fn heading<T>(&mut self, _text: T) {}
#[inline]
pub fn button<T>(&mut self, _text: T) -> Resp {
Resp
}
Expand Down
1 change: 1 addition & 0 deletions efx-sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ publish = false

[dependencies]
eframe = "0.32"
egui = "0.32"
efx = { path = "../efx" }
Loading
Loading