egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
This release contains a simple and powerful image API:
// Load from web:
ui.image("https://www.example.com/some_image.png");
// Include image in the binary using `include_bytes`:
ui.image(egui::include_image!("../assets/ferris.svg"));
// With options:
ui.add(
egui::Image::new("file://path/to/image.jpg")
.max_width(200.0)
.rounding(10.0),
);
The API is based on a plugin-system, where you can tell egui
how to load the images, and from where.
egui_extras
comes with loaders for you, so all you need to do is add the following to your Cargo.toml
:
egui_extras = { version = "0.23", features = ["all_loaders"] }
image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
And this to your code:
egui_extras::install_image_loaders(egui_ctx);
Try the live demo at https://www.egui.rs/
egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
There's a bunch of improvements in 0.22, especially to eframe:
NativeOptions::icon_data
NativeOptions::follow_system_theme
. Works both on native and on web!Try the live demo at https://www.egui.rs/
This is a relatively minor release, but with a major breaking change in the egui API to prevent a rare deadlock.
Full changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
egui
changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
eframe
changelog: https://github.com/emilk/egui/blob/master/crates/eframe/CHANGELOG.md
Highlights:
Context::request_repaint_after
egui changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md eframe changelog: https://github.com/emilk/egui/blob/master/crates/eframe/CHANGELOG.md
Highlights:
egui highlights:
eframe highlights:
Full changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
Highlights:
Highlights:
egui_glow
: a glow backend for eframe (opt-in)egui-web