egui/examples
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
..
confirm_exit Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_3d_glow Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_font Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_font_style Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_keypad Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_style Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
custom_window_frame Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
file_dialog Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_android Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world_par Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
hello_world_simple Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
images Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
keyboard_events Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
multiple_viewports Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
popups Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
puffin_profiler Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
screenshot Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
serial_windows Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
user_attention Raise MSRV to 1.84 (#6848) 2025-04-24 17:00:29 +02:00
README.md examples/README.md: explain that the examples are for master 2023-02-08 20:34:43 +01:00
run_all.sh Fix up some examples (#3614) 2023-11-23 12:58:44 +01:00

README.md

egui and eframe examples

All the examples in this folder uses eframe to set up a window for egui. Some examples are specific to eframe, but many are applicable to any egui integration.

There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.

Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.

Note that all the examples on master are for the latest master version of egui.

If you want to look for examples for a specific version of egui, go to that tag, e.g. https://github.com/emilk/egui/tree/latest/examples.