Cargo Features
[dependencies]
eframe = { version = "0.28.1", default-features = false, features = ["accesskit", "android-game-activity", "android-native-activity", "default_fonts", "glow", "persistence", "puffin", "wayland", "web_screen_reader", "wgpu", "x11"] }
- default = accesskit, default_fonts, glow, wayland, web_screen_reader, x11
-
These default features are set whenever
eframe
is added without
somewhere in the dependency tree.default-features = false Enables winit ^0.29.4
- accesskit default
-
Enable platform accessibility API implementations through AccessKit.
Enables accesskit of egui and egui-winit
- android-game-activity
-
Allow crates to choose an android-activity backend via Winit
- It's important that most applications should not have to depend on android-activity directly, and can rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link)
- It's also important that we don't impose an android-activity backend by taking this choice away from applications.
Enable the
game-activity
backend viaegui-winit
on AndroidEnables android-game-activity of egui-winit
- android-native-activity
-
Enable the
native-activity
backend viaegui-winit
on AndroidEnables android-native-activity of egui-winit
- 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 egui
- glow default
-
Enables rwh_05 of winit ^0.29.4 and raw-window-handle ^0.5.2
glutin stuck on old version of raw-window-handle:
and egui_glow, glow ^0.13, glutin ^0.31, and glutin-winit ^0.4
egui_glow:
Optional dependencies
Affects
epi::CreationContext.gl
,epi::CreationContext.get_proc_address
,epi::App.on_exit
,epi::NativeOptions.shader_version
,epi::WebOptions.webgl_context_option
,run::run_glow
,epi::EventLoopBuilderHook
,epi::WindowBuilderHook
,epi::NativeOptions.renderer
,epi::NativeOptions.event_loop_builder
,epi::NativeOptions.window_builder
,epi::Renderer
,eframe::run_native
,eframe::run_simple_native
… - persistence = directories, ron, serde
-
Enable saving app state to disk.
Enables persistence of egui, serde of egui-winit
Affects
native::file_storage
… - puffin
-
Enable profiling with the
puffin
crate.eframe
will callpuffin::GlobalProfiler::lock().new_frame()
for youOnly enabled on native, because of the low resolution (1ms) of clocks in browsers.
Enables puffin, puffin of egui, egui-winit, optional egui-wgpu, and optional egui_glow
- wayland default
-
Enables wayland support and fixes clipboard issue.
Enables wayland of optional egui-wgpu, egui-winit, and optional egui_glow
- web_screen_reader default
-
Enable screen reader support (requires
ctx.options_mut(|o| o.screen_reader = true);
) on web.For other platforms, use the
accesskit
feature instead.Enables SpeechSynthesis and SpeechSynthesisUtterance of web-sys
Affects
web::screen_reader
… - wgpu
-
Use
wgpu
for painting (viaegui-wgpu
).This overrides the
glow
feature.By default, only WebGPU is enabled on web. If you want to enable WebGL, you need to turn on the
webgl
feature of cratewgpu
:wgpu = { version = "*", features = ["webgpu", "webgl"] }
By default, eframe will prefer WebGPU over WebGL, but you can configure this at run-time with
NativeOptions::wgpu_options
.Enables egui-wgpu, pollster, and wgpu ^0.20.0
Affects
epi::CreationContext.wgpu_render_state
,epi::NativeOptions.wgpu_options
,epi::WebOptions.wgpu_options
,run::run_wgpu
,epi::EventLoopBuilderHook
,epi::WindowBuilderHook
,epi::NativeOptions.renderer
,epi::NativeOptions.event_loop_builder
,epi::NativeOptions.window_builder
,epi::Renderer
,eframe::run_native
,eframe::run_simple_native
… - x11 default
-
Enables compiling for x11.
Enables x11 of optional egui-wgpu, egui-winit, and optional egui_glow
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- ron persistence?
-
Affects
epi::get_value
,epi::set_value
… - serde persistence?
- directories not wasm32 persistence?