eGUI Window

cargo new egui-window
cd egui-window
cargo add eframe

This will make Cargo.toml look like this:

name = "egui-window"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at

eframe = "0.24"

The code is here:

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
    let options = eframe::NativeOptions {
        viewport: egui::ViewportBuilder::default()
        .with_inner_size([320.0, 240.0]),

    eframe::run_simple_native("Rust Maven egui App", options, move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |_ui| {

When you click on the X to close the window, you might get lots of warnings like this:

warning: queue 0x7fa398000ca0 destroyed while proxies still attached:

This was reported here.