Cargo Features
egui_extras has no features set by default.
[dependencies]
egui_extras = { version = "0.30.0", features = ["all_loaders", "datepicker", "file", "gif", "http", "image", "serde", "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, gif, 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
- gif all_loaders? = image
-
Support loading gif images.
- http all_loaders?
-
Add support for loading images via HTTP.
Enables ehttp
http feature
- image all_loaders? gif?
-
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.25", features = ["jpeg", "png"] } # Add the types you want support for
Enables image
Affects
image::load_image_bytes
… - serde
-
Derive serde Serialize/Deserialize on stateful structs
Enables serde of egui and serde
Optional dependencies
Serde for serializing state
- 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
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