1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
[package]
name = "egui_extras"
version.workspace = true
authors = [
"Dominik Rössler <dominik@freshx.de>",
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
"René Rössler <rene@freshx.de>",
]
description = "Extra functionality and widgets for the egui GUI library"
edition.workspace = true
rust-version.workspace = true
homepage = "https://github.com/emilk/egui"
license.workspace = true
readme = "README.md"
repository = "https://github.com/emilk/egui"
categories = ["gui", "game-development"]
keywords = ["gui", "imgui", "immediate", "portable", "gamedev"]
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
[package.metadata.docs.rs]
all-features = true
[lib]
[features]
default = ["dep:mime_guess2"]
## Shorthand for enabling the different types of image loaders (`file`, `http`, `image`, `svg`).
all_loaders = ["file", "http", "image", "svg"]
## Enable [`DatePickerButton`] widget.
datepicker = ["chrono"]
## Add support for loading images from `file://` URIs.
file = ["dep:mime_guess2"]
## Add support for loading images via HTTP.
http = ["dep:ehttp"]
## Add support for loading images with the [`image`](https://docs.rs/image) crate.
##
## You also need to ALSO opt-in to the image formats you want to support, like so:
## ```toml
## image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
## ```
image = ["dep:image"]
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
##
## Only enabled on native, because of the low resolution (1ms) of clocks in browsers.
puffin = ["dep:puffin", "egui/puffin"]
## Support loading svg images.
svg = ["resvg", "tiny-skia", "usvg"]
## Enable better syntax highlighting using [`syntect`](https://docs.rs/syntect).
syntect = ["dep:syntect"]
[dependencies]
egui = { version = "0.24.1", path = "../egui", default-features = false, features = [
"serde",
] }
enum-map = { version = "2", features = ["serde"] }
log = { version = "0.4", features = ["std"] }
serde = { version = "1", features = ["derive"] }
#! ### Optional dependencies
# Date operations needed for datepicker widget
chrono = { version = "0.4", optional = true, default-features = false, features = [
"clock",
"js-sys",
"std",
"wasmbind",
] }
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }
image = { version = "0.24", optional = true, default-features = false }
# file feature
mime_guess2 = { version = "2", optional = true, default-features = false }
puffin = { workspace = true, optional = true }
syntect = { version = "5", optional = true, default-features = false, features = [
"default-fancy",
] }
# svg feature
resvg = { version = "0.28", optional = true, default-features = false }
tiny-skia = { version = "0.8", optional = true, default-features = false } # must be updated in lock-step with resvg
usvg = { version = "0.28", optional = true, default-features = false }
# http feature
ehttp = { version = "0.3.1", optional = true, default-features = false }
|