Cargo Features
[dependencies]
egui = { version = "0.24.1", default-features = false, features = ["accesskit", "bytemuck", "callstack", "cint", "color-hex", "deadlock_detection", "default_fonts", "extra_debug_asserts", "extra_asserts", "log", "mint", "persistence", "puffin", "serde", "unity", "document-features"] }
- default = default_fonts
-
The
default_fonts
feature is set by default wheneveregui
is added without
somewhere in the dependency tree.default-features = false - accesskit
-
Exposes detailed accessibility implementation required by platform accessibility APIs. Also requires support in the egui integration.
Affects
output::PlatformOutput.accesskit_update
,egui::accesskit_root_id
… - bytemuck
-
bytemuck
enables you to castepaint::Vertex
,emath::Vec2
etc to&[u8]
. - callstack
-
Show a debug-ui on hover including the stacktrace to the hovered item.
This is very useful in finding the code that creates a part of the UI.
Does not work on web.Enables backtrace
- cint
-
cint
enables interoperability with other color libraries. - color-hex
-
Enable the
hex_color
macro. - deadlock_detection
-
This will automatically detect deadlocks due to double-locking on the same thread. If your app freezes, you may want to enable this! Only affects
epaint::mutex::RwLock
(which egui uses a lot).Enables deadlock_detection of epaint
- default_fonts default
-
If set, egui will use
include_bytes!
to bundle some fonts. If you plan on specifying your own fonts you may disable this feature.Enables default_fonts of epaint
- extra_debug_asserts
-
Enable additional checks if debug assertions are enabled (debug builds).
Enables extra_debug_asserts of epaint
- extra_asserts
-
Always enable additional checks.
Enables extra_asserts of epaint
- log
-
Turn on the
log
feature, that makes egui log some errors using thelog
crate. - mint
-
mint
enables interoperability with other math libraries such asglam
andnalgebra
. - persistence = ron, serde
-
Enable persistence of memory (window positions etc).
Affects
id_type_map::SerializableAny
… - puffin
-
Enable profiling with the
puffin
crate.Only enabled on native, because of the low resolution (1ms) of clocks in browsers.
- serde persistence?
-
Allow serialization using
serde
. - unity
-
Change Vertex layout to be compatible with unity
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features.
- document-features implicit feature
-
- ron persistence?