1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Commit Graph

110 Commits

Author SHA1 Message Date
Lucas Meurer
68b74530b7 Release 0.35.0 - Inspection, egui_mcp, classes and improved IME (#8268) 2026-06-25 18:48:18 +00:00
Emil Ernerfeldt
4a897168a6 generate_changelog.py: use gh-cli instead of access token (#8197) 2026-05-25 12:09:54 +02:00
Emil Ernerfeldt
27373b06d0 Style: forbid .zip and .chain (#8188)
The `zip(a, b)` variant produces clearer code imho.

Downside: added dependency on `itertools`
2026-05-22 12:25:34 +02:00
Emil Ernerfeldt
fbe5763a91 Remove fixed RUSTSEC advisory from deny.toml 2026-03-23 18:53:45 +01:00
Emil Ernerfeldt
bccd5f87bd Update wasm-bindgen to 0.2.108, and ehttp to 0.7.1 (#7996) 2026-03-23 12:33:41 +01:00
Jasper Riedel
661d5f9173 Update MSRV from 1.88 to 1.92 (#7793) 2025-12-20 13:52:34 +01:00
AdrienZ.
9c3a0bb37c Per-widget style (#7667)
* Closes <https://github.com/emilk/egui/issues/7586>

Implementation of the per-widget style of the action plan to add better
styling option to egui

---------

Co-authored-by: adrien <221212@umons.ac.be>
Co-authored-by: Adrien Zianne <adrien@iq002.ipa.iqrypto.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-12-16 18:49:27 +01:00
Emil Ernerfeldt
d53a4a9c1d Update docs to reflect that wgpu is the default renderer (#7719)
I missed a few parts when merging
* https://github.com/emilk/egui/pull/7615
2025-11-18 15:56:35 +01:00
Emil Ernerfeldt
9ef610e16b Make wgpu the default renderer for eframe and egui.rs (#7615)
* Closes https://github.com/emilk/egui/issues/5889

See the above issue for motivation.

To use glow instead, disable the default features of `eframe` and opt-in
to `glow`.

This also changes egui.rs to use wgpu, which means WebGPU when
available, and WebGL otherwise
2025-11-13 11:16:23 +01:00
Lucas Meurer
96470fabee Release 0.33.0 - egui::Plugin, better kerning, kitdiff viewer (#7622)
## Short bluesky announcement:

We just released egui 0.33.0! 

Highlights:
- `egui::Plugin` a improved way to create and access egui plugins
- [kitdiff](https://github.com/rerun-io/kitdiff), a viewer for
egui_kittest image snapshots (and a general image diff tool)
- better kerning (check the diff on
[kitdiff](https://rerun-io.github.io/kitdiff/?url=https://github.com/emilk/egui/pull/7431))


https://github.com/user-attachments/assets/971f0493-6dae-42e5-8019-58b74cf5d203


## Relaese Changelog:

egui is an easy-to-use immediate mode GUI for Rust that runs on both web
and native.

Try it now: <https://www.egui.rs/>

egui development is sponsored by [Rerun](https://www.rerun.io/), a
startup building an SDK for visualizing streams of multimodal data.

# egui 0.33.0 changelog

Highlights from this release:
- `egui::Plugin` a improved way to create and access egui plugins
- [kitdiff](https://github.com/rerun-io/kitdiff), a viewer for
egui_kittest image snapshots (and a general image diff tool)
- better kerning


### Improved kerning
As a step towards using [parley](https://github.com/linebender/parley)
for font rendering, @valadaptive has refactored the font loading and
rendering code. A result of this (next to the font rendering code being
much nicer now) is improved kerning.
Notice how the c moved away from the k:

![Oct-09-2025
16-21-58](https://github.com/user-attachments/assets/d4a17e87-5e98-40db-a85a-fa77fa77aceb)


### `egui::Plugin` trait
We've added a new trait-based plugin api, meant to replace
`Context::on_begin_pass` and `Context::on_end_pass`.
This makes it a lot easier to handle state in your plugins. Instead of
having to write to egui memory it can live right on your plugin struct.
The trait based api also makes easier to add new hooks that plugins can
use. In addition to `on_begin_pass` and `on_end_pass`, the `Plugin`
trait now has a `input_hook` and `output_hook` which you can use to
inspect / modify the `RawInput` / `FullOutput`.

### kitdiff, a image diff viewer
At rerun we have a ton of snapshots. Some PRs will change most of them
(e.g. [the](https://github.com/rerun-io/rerun/pull/11253/files)
[one](https://rerun-io.github.io/kitdiff/?url=https://github.com/rerun-io/rerun/pull/11253/files)
that updated egui and introduced the kerning improvements, ~500
snapshots changed!).
If you really want to look at every changed snapshot it better be as
efficient as possible, and the experience on github, fiddeling with the
sliders, is kind of frustrating.
In order to fix this, we've made
[kitdiff](https://rerun-io.github.io/kitdiff/).
You can use it locally via 
- `kitdiff files .` will search for .new.png and .diff.png files
- `kitdiff git` will compare the current files to the default branch
(main/master)
Or in the browser via
- going to https://rerun-io.github.io/kitdiff/ and pasting a PR or
github artifact url
- linking to kitdiff via e.g. a github workflow
`https://rerun-io.github.io/kitdiff/?url=<link_to_pr_or_artefact>`

To install kitdiff run `cargo install --git
https://github.com/rerun-io/kitdiff`

Here is a video showing the kerning changes in kitdiff ([try it
yourself](https://rerun-io.github.io/kitdiff/?url=https://github.com/rerun-io/rerun/pull/11253/files)):


https://github.com/user-attachments/assets/74640af1-09ba-435a-9d0c-2cbeee140c8f

###  Migration guide
- `egui::Mutex` now has a timeout as a simple deadlock detection
- If you use a `egui::Mutex` in some place where it's held for longer
than a single frame, you should switch to the std mutex or parking_lot
instead (egui mutexes are wrappers around parking lot)
- `screen_rect` is deprecated
- In order to support safe areas, egui now has `viewport_rect` and
`content_rect`.
- Update all usages of `screen_rect` to `content_rect`, unless you are
sure that you want to draw outside the `safe area` (which would mean
your Ui may be covered by notches, system ui, etc.)
2025-10-09 19:14:14 +02:00
Lucas Meurer
da39198142 Some minor docs improvements (#7614) 2025-10-09 12:00:39 +02:00
Emil Ernerfeldt
9e13889589 Revert wasm-bindgen to 0.2.100 (#7612) 2025-10-09 08:56:33 +02:00
Emil Ernerfeldt
94f2ed6334 Do not lock wasm-bindgen version (#7609) 2025-10-08 17:09:04 +02:00
Emil Ernerfeldt
ac4e04d0b8 cargo upgrade (#7598) 2025-10-07 15:30:00 +02:00
Emil Ernerfeldt
78fffc7707 clean up the clippy.toml:s (#7594) 2025-10-07 14:12:51 +02:00
Lucas Meurer
f0faacc7d1 Add workflow to accept snapshots via kitdiff (#7577)
This adds a new workflow `update_kittest_snapshots.yml` that can be
triggered through the [kitdiff](https://github.com/rerun-io/kitdiff) ui
when viewing a ci artefact.
Also adds a link to kitdiff to view the pr changes to each commit (via
the preview build comment)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 15:57:31 +02:00
Andreas Reich
4c1f344ef8 Update MSRV from 1.86 to 1.88 (#7579)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-10-02 19:12:29 +02:00
Kumpelinus
c97c065a57 Update wgpu to 26 and wasm-bindgen to 0.2.100 (#7540)
Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-09-21 20:42:00 +02:00
Lucas Meurer
73c5892a4d Generate changelogs for emath (#7513)
Sometimes there are changes that only affect emath, so those should be
listed somewhere
2025-09-08 10:13:21 +02:00
Emil Ernerfeldt
531ead5ad1 Update MSRV to 1.86 (#7469) 2025-08-21 15:38:41 +02:00
Emil Ernerfeldt
fabd4aa7a5 Release 0.32.0 - Atoms, popups, and better SVG support (#7329) 2025-07-10 16:58:39 +02:00
Emil Ernerfeldt
8d2f39fc08 Improve release checklist (#7322)
* See https://github.com/emilk/egui/issues/7321
2025-07-09 19:36:38 +02:00
Emil Ernerfeldt
9d1dce51eb Extend .typos.toml to enforce american english (#7284)
More or less the same list we use at Rerun
2025-07-01 15:54:00 +02:00
Emil Ernerfeldt
962c8e26a8 Update MSRV to 1.85 (#7279) 2025-06-30 13:43:27 +02:00
Lucas Meurer
6d04140736 Fix update from ci script on linux (#7113)
Apparently MacOS is case insensitive 😬
2025-06-04 10:10:47 +02:00
TÖRÖK Attila
fdb9aa282a Raise MSRV to 1.84 (#6848)
Prerequisite of https://github.com/emilk/egui/pull/6744.
See: https://github.com/gfx-rs/wgpu/pull/7218,
https://github.com/gfx-rs/wgpu/pull/7425

Please be aware that Rust 1.84 enables some (more) WASM extensions by
default, and ships with an `std` built with them enabled:
https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features/
According to `rustc +1.84 --print=cfg --target wasm32-unknown-unknown`,
these are: `multivalue`, `mutable-globals`, `reference-types`, and
`sign-ext`.
(c.f. `rustc +1.84 --print=cfg --target wasm32-unknown-unknown -C
target-cpu=mvp` enabling none.)
For reference: https://webassembly.org/features/

----

If support is desired for ancient/esoteric browsers that don't have
these implemented, there are two ways to get around this:
- Target `wasm32v1-none` instead, but that's a `no-std` target, and I
suppose a lot of dependencies don't work that way (e.g.
https://github.com/gfx-rs/wgpu/issues/6826)
- Using the `-Ctarget-cpu=mvp` and `-Zbuild-std=panic_abort,std` flags,
and the `RUSTC_BOOTSTRAP=1` escape hatch to allow using the latter with
non-`nightly` toolchains - until
https://github.com/rust-lang/wg-cargo-std-aware is stabilized. (For
reference:
https://github.com/ruffle-rs/ruffle/pull/18528/files#diff-fb2896d189d77b35ace9a079c1ba9b55777d16e0f11ce79f776475a451b1825a)

I don't think either of these is particularly advantageous, so I suggest
just accepting that browsers will have to have some extensions
implemented to run `egui`.
2025-04-24 17:00:29 +02:00
Nicolas
58b2ac88c0 Add assert messages and print bad argument values in asserts (#5216)
Enabled the `missing_assert_message` lint

* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Lucas Meurer <lucasmeurer96@gmail.com>
2025-03-25 09:20:29 +01:00
Lucas Meurer
903bd81313 Add script to update local snapshots from CI (#5816)
It seems like the thresholds are too low for all tests to pass when
snapshots are generated from windows / linux. We need a better solution
to this problem, but in the meantime this script should allow
contributors to update their snapshots by downloading them from the last
CI run.
2025-03-25 09:19:21 +01:00
Emil Ernerfeldt
f162c3bcbf Explain how to set up generate_changelog.py 2025-02-04 16:30:32 +01:00
Emil Ernerfeldt
8d2c8c203c generate_changelog.py: add sections for "Performance" and "Removed" 2025-01-29 13:07:05 +01:00
Emil Ernerfeldt
83649f2e29 Improve changelog generator 2025-01-29 08:44:56 +01:00
Yerkebulan Tulibergenov
7129418289 Use Python 3 in scripts/lint.py (#5617)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* [x] I have followed the instructions in the PR template

## Changes

- Use Python 3 in `scripts/lint.py`.

## Why

Some modern OS and distributions do not provide Python 2 by default.
This includes recent macOS versions.
I see that `scripts/generate_changelog.py` already uses Python 3, so I
don't think this change should be controversial.
Without this change, I am unable to run `./scripts/check.sh` on macOS
15.2 without installing Python 2 or adding alias for `python`
executable.
2025-01-22 15:28:38 +01:00
TÖRÖK Attila
a5d7cf5bd7 Upgrade to wgpu 24 (#5610) 2025-01-16 17:00:29 +01:00
Emil Ernerfeldt
5cbf337f18 check.sh: enable all features when running cargo test 2025-01-03 14:55:51 +01:00
Emil Ernerfeldt
e2c7e9e733 Add OutputCommand for copying text and opening URL:s (#5532)
Add `OutputCommand` for copying text and opening URL:s

* Part of https://github.com/emilk/egui/issues/5424
* Adds `egui::OutputComm
* Part of https://github.com/emilk/egui/issues/5424and`
* Adds `PlatformOutput::commands`
* Deprecates `PlatformOutput::open_url`
* Deprecates `PlatformOutput::copied_text`
2024-12-29 11:59:51 +01:00
Emil Ernerfeldt
820d42802a Fix build of egui.rs (#5528) 2024-12-28 21:52:37 +01:00
Emil Ernerfeldt
f37a8f91ca Better output when building demo 2024-12-28 21:44:56 +01:00
Emil Ernerfeldt
99c1034cfc Improve changelog generation script 2024-12-12 16:57:52 +01:00
Emil Ernerfeldt
53a926a428 Update MSRV to 1.80 (#5457)
Because some dependencies now require it, see:
* https://github.com/emilk/egui/pull/5456
2024-12-10 16:09:03 +01:00
Emil Ernerfeldt
328422dc62 Update MSRV to Rust 1.79 (#5421)
Mostly to fix `cargo-machete` CI
2024-12-01 18:58:35 +01:00
lucasmerlin
793cb92557 Add egui_kittest label to workflow and changelog script (#5323)
* [X] I have followed the instructions in the PR template
2024-11-01 13:25:41 +01:00
TÖRÖK Attila
67c82ed5f2 wgpu: Bump to wgpu 23.0.0 and wasm-bindgen to 0.2.95 (#5330)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-10-30 18:53:22 +01:00
Cody Neiman
2cd3485dd4 Update MSRV from 1.76 to 1.77 (#5322)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* [X] I have followed the instructions in the PR template

I am preparing a separate PR that adds support for JXL with `jxl-oxide`,
which is unlikely to be added to the `image` crate anytime soon (more
context will be provided in that PR).

`jxl-oxide` makes use of the
[`array::each_mut`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.each_mut)
API which was stabilized in 1.77, which is the motivation for this MSRV
bump.

Rust 1.77 was officially released to stable on 21 March, 2024.
2024-10-30 09:06:34 +01:00
lucasmerlin
5b846b4554 Fix cargo test in check.sh (#5299)
The check.sh script was broken in #5166, this fixes it
* Related to #5297 
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-10-24 14:05:06 +02:00
Emil Ernerfeldt
59d71831fd Release 0.29.0 - Multipass, UiBuilder, & visual improvements 2024-09-26 15:32:02 +02:00
Emil Ernerfeldt
7bac528d4d Add egui::Sides for adding UI on left and right sides (#5036)
* Closes https://github.com/emilk/egui/issues/5015
2024-09-02 10:47:20 +02:00
Nicolas
343c3d16c3 Remove wildcard imports (#5018)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

I removed (I hope so) all wildcard imports I found.

For me on my pc this improved the build time:
- for egui -5s
- for eframe -12s

* [x] I have followed the instructions in the PR template
2024-08-28 12:18:42 +02:00
Emil Ernerfeldt
a9a6e0c2f2 Remove the need for setting web_sys_unstable_apis (#5000)
* No longer required since https://github.com/emilk/egui/pull/4980

And despite some outdated comments, wgpu/WebGPU doesn't need it either
2024-08-26 16:31:38 +02:00
Nicolas
560b2989a7 Update web-sys & wasm-bindgen (#4980)
This PR updates web-sys & wasm to the newest version.

(this was already part of the POC #4954 )

* Closes <https://github.com/emilk/egui/issues/4961>
* Closes <https://github.com/emilk/egui/issues/4958>
* [x] I have followed the instructions in the PR template
2024-08-26 11:38:30 +02:00
Alex Pinkus
ae7672e336 Move default fonts to new crate epaint_default_fonts (#4853)
This allows license checking tools to omit the OFL and UFL licenses when
`default_fonts` are turned off.

There was some discussion of versioning on the original issue; I have
chosen to label this version as `0.28.1` to match the other crates.
Happy to adjust the version as needed.

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* Closes <https://github.com/emilk/egui/issues/2321>
* [X] I have followed the instructions in the PR template

---------

Co-authored-by: Alex Pinkus <pinkus@amazon.com>
2024-07-31 09:50:02 +02:00