Cargo Features
egui_extras has no features set by default.
[dependencies]
egui_extras = { version = "0.27.2", features = ["all_loaders", "datepicker", "file", "http", "image", "puffin", "svg", "syntect", "document-features"] }
- default
-
These default features are set whenever
egui_extras
is added without
somewhere in the dependency tree.default-features = false Enables mime_guess2
file feature
- all_loaders = file, http, image, svg
-
Shorthand for enabling the different types of image loaders (
file
,http
,image
,svg
). - datepicker = chrono
-
Enable
DatePickerButton
widget. - file all_loaders?
-
Add support for loading images from
file://
URIs.Enables mime_guess2
- http all_loaders?
-
Add support for loading images via HTTP.
Enables ehttp
http feature
- image all_loaders?
-
Add support for loading images with the
image
crate.You also need to ALSO opt-in to the image formats you want to support, like so:
image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
Enables image ^0.24
Affects
image::load_image_bytes
… - puffin
-
Enable profiling with the
puffin
crate.Only enabled on native, because of the low resolution (1ms) of clocks in browsers.
- svg all_loaders? = resvg
-
Support loading svg images.
Affects
image::load_svg_bytes
,image::load_svg_bytes_with_size
… - syntect
-
Enable better syntax highlighting using
syntect
.Enables syntect
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.
- chrono datepicker?
-
Enables chrono
### Optional dependencies
Date operations needed for datepicker widget - document-features implicit feature
-
Enables document-features
Enable this when generating docs.
- resvg svg?
-
Enables resvg ^0.37
svg feature