Clean up all Cargo.toml: put features higher, and document them better
This commit is contained in:
parent
32a9b4abcc
commit
0fa4bb9c64
11 changed files with 181 additions and 147 deletions
|
@ -23,6 +23,31 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "egui_glow"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# Enable saving app state to disk.
|
||||
persistence = [
|
||||
# we cannot touch egui_glium or egui_glow here due to https://github.com/rust-lang/cargo/issues/8832
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
"epi/file_storage",
|
||||
"epi/persistence",
|
||||
]
|
||||
|
||||
# enable screen reader support (requires `ctx.options().screen_reader = true;`)
|
||||
screen_reader = [
|
||||
# we cannot touch egui_glium or egui_glow here due to https://github.com/rust-lang/cargo/issues/8832
|
||||
"egui-winit/screen_reader",
|
||||
"egui_web/screen_reader",
|
||||
]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false }
|
||||
epi = { version = "0.16.0", path = "../epi" }
|
||||
|
@ -43,25 +68,3 @@ image = { version = "0.24", default-features = false, features = ["jpeg", "png"]
|
|||
poll-promise = "0.1"
|
||||
rfd = "0.7"
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "egui_glow"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# Enable saving app state to disk.
|
||||
persistence = [
|
||||
# we cannot touch egui_glium or egui_glow here due to https://github.com/rust-lang/cargo/issues/8832
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
"epi/file_storage",
|
||||
"epi/persistence",
|
||||
]
|
||||
|
||||
# experimental support for a screen reader
|
||||
screen_reader = [
|
||||
# we cannot touch egui_glium or egui_glow here due to https://github.com/rust-lang/cargo/issues/8832
|
||||
"egui-winit/screen_reader",
|
||||
"egui_web/screen_reader",
|
||||
]
|
||||
|
|
|
@ -21,21 +21,6 @@ include = [
|
|||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded", "tracing"] }
|
||||
instant = { version = "0.1", features = ["wasm-bindgen"] }
|
||||
tracing = "0.1"
|
||||
winit = "0.26.1"
|
||||
|
||||
epi = { version = "0.16.0", path = "../epi", optional = true }
|
||||
|
||||
copypasta = { version = "0.7", optional = true }
|
||||
dark-light = { version = "0.2.1", optional = true } # detect dark mode system preference
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
webbrowser = { version = "0.5", optional = true }
|
||||
|
||||
# feature screen_reader
|
||||
tts = { version = "0.20", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "dark-light", "links"]
|
||||
|
@ -55,3 +40,20 @@ serialize = ["egui/serialize", "serde"]
|
|||
|
||||
# implement bytemuck on most types.
|
||||
convert_bytemuck = ["egui/convert_bytemuck"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded", "tracing"] }
|
||||
instant = { version = "0.1", features = ["wasm-bindgen"] }
|
||||
tracing = "0.1"
|
||||
winit = "0.26.1"
|
||||
|
||||
epi = { version = "0.16.0", path = "../epi", optional = true }
|
||||
|
||||
copypasta = { version = "0.7", optional = true }
|
||||
dark-light = { version = "0.2.1", optional = true } # detect dark mode system preference
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
webbrowser = { version = "0.5", optional = true }
|
||||
|
||||
# feature screen_reader
|
||||
tts = { version = "0.20", optional = true }
|
||||
|
|
|
@ -23,17 +23,6 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
epaint = { version = "0.16.0", path = "../epaint", default-features = false }
|
||||
|
||||
ahash = "0.7"
|
||||
nohash-hasher = "0.2"
|
||||
|
||||
# Optional:
|
||||
ron = { version = "0.7", optional = true }
|
||||
serde = { version = "1", features = ["derive", "rc"], optional = true }
|
||||
# egui doesn't log much, but when it does, it uses `tracing`
|
||||
tracing = { version = "0.1", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "single_threaded"]
|
||||
|
@ -66,3 +55,16 @@ serialize = ["serde", "epaint/serialize"]
|
|||
# from multiple threads. It comes with a minor performance impact.
|
||||
single_threaded = ["epaint/single_threaded"]
|
||||
multi_threaded = ["epaint/multi_threaded"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
epaint = { version = "0.16.0", path = "../epaint", default-features = false }
|
||||
|
||||
ahash = "0.7"
|
||||
nohash-hasher = "0.2"
|
||||
|
||||
# Optional:
|
||||
ron = { version = "0.7", optional = true }
|
||||
serde = { version = "1", features = ["derive", "rc"], optional = true }
|
||||
# egui doesn't log much, but when it does, it uses `tracing`
|
||||
tracing = { version = "0.1", optional = true }
|
||||
|
|
|
@ -7,9 +7,21 @@ edition = "2021"
|
|||
rust-version = "1.56"
|
||||
publish = false
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
|
||||
[features]
|
||||
default = ["persistence"]
|
||||
http = ["egui_demo_lib/http"]
|
||||
persistence = ["eframe/persistence", "egui_demo_lib/persistence"]
|
||||
screen_reader = ["eframe/screen_reader"] # experimental
|
||||
syntax_highlighting = ["egui_demo_lib/syntax_highlighting"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
eframe = { version = "0.16.0", path = "../eframe" }
|
||||
|
||||
|
@ -18,10 +30,3 @@ eframe = { version = "0.16.0", path = "../eframe" }
|
|||
|
||||
egui_demo_lib = { version = "0.16.0", path = "../egui_demo_lib", features = ["extra_debug_asserts"] }
|
||||
tracing-subscriber = "0.3"
|
||||
|
||||
[features]
|
||||
default = ["persistence"]
|
||||
http = ["egui_demo_lib/http"]
|
||||
persistence = ["eframe/persistence", "egui_demo_lib/persistence"]
|
||||
screen_reader = ["eframe/screen_reader"] # experimental
|
||||
syntax_highlighting = ["egui_demo_lib/syntax_highlighting"]
|
||||
|
|
|
@ -23,6 +23,21 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
|
||||
[features]
|
||||
default = ["chrono"]
|
||||
|
||||
# Enable additional checks if debug assertions are enabled (debug builds).
|
||||
extra_debug_asserts = ["egui/extra_debug_asserts"]
|
||||
# Always enable additional checks.
|
||||
extra_asserts = ["egui/extra_asserts"]
|
||||
|
||||
http = ["ehttp", "image", "poll-promise"]
|
||||
persistence = ["egui/persistence", "epi/persistence", "serde"]
|
||||
serialize = ["egui/serialize", "serde"]
|
||||
syntax_highlighting = ["syntect"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false }
|
||||
epi = { version = "0.16.0", path = "../epi" }
|
||||
|
@ -45,18 +60,6 @@ serde = { version = "1", features = ["derive"], optional = true }
|
|||
[dev-dependencies]
|
||||
criterion = { version = "0.3", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["chrono"]
|
||||
|
||||
# Enable additional checks if debug assertions are enabled (debug builds).
|
||||
extra_debug_asserts = ["egui/extra_debug_asserts"]
|
||||
# Always enable additional checks.
|
||||
extra_asserts = ["egui/extra_asserts"]
|
||||
|
||||
http = ["ehttp", "image", "poll-promise"]
|
||||
persistence = ["egui/persistence", "epi/persistence", "serde"]
|
||||
serialize = ["egui/serialize", "serde"]
|
||||
syntax_highlighting = ["syntect"]
|
||||
|
||||
[[bench]]
|
||||
name = "benchmark"
|
||||
|
|
|
@ -22,20 +22,6 @@ include = [
|
|||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = [
|
||||
"convert_bytemuck",
|
||||
"single_threaded",
|
||||
] }
|
||||
egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false, features = ["epi"] }
|
||||
epi = { version = "0.16.0", path = "../epi", optional = true }
|
||||
|
||||
ahash = "0.7"
|
||||
bytemuck = "1.7"
|
||||
glium = "0.31"
|
||||
|
||||
[dev-dependencies]
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence"]
|
||||
|
@ -51,6 +37,7 @@ default_fonts = ["egui/default_fonts"]
|
|||
# enable opening links in a browser when an egui hyperlink is clicked.
|
||||
links = ["egui-winit/links"]
|
||||
|
||||
# enable persisting native window options and egui memory
|
||||
persistence = [
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
|
@ -61,3 +48,19 @@ persistence = [
|
|||
|
||||
# experimental support for a screen reader
|
||||
screen_reader = ["egui-winit/screen_reader"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = [
|
||||
"convert_bytemuck",
|
||||
"single_threaded",
|
||||
] }
|
||||
egui-winit = { version = "0.16.0", path = "../egui-winit", default-features = false, features = ["epi"] }
|
||||
epi = { version = "0.16.0", path = "../epi", optional = true }
|
||||
|
||||
ahash = "0.7"
|
||||
bytemuck = "1.7"
|
||||
glium = "0.31"
|
||||
|
||||
[dev-dependencies]
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
|
|
|
@ -22,6 +22,38 @@ include = [
|
|||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence", "winit"]
|
||||
|
||||
# enable cut/copy/paste to OS clipboard.
|
||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||
clipboard = ["egui-winit/clipboard"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# enable opening links in a browser when an egui hyperlink is clicked.
|
||||
links = ["egui-winit/links"]
|
||||
|
||||
# enable persisting native window options and egui memory
|
||||
persistence = [
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
"epi", # also implied by the lines below, see https://github.com/rust-lang/cargo/issues/8832
|
||||
"epi/file_storage",
|
||||
"epi/persistence",
|
||||
]
|
||||
|
||||
# experimental support for a screen reader
|
||||
screen_reader = ["egui-winit/screen_reader"]
|
||||
|
||||
# enable glutin/winit integration.
|
||||
# if you want to use glow painter on web disable this feature.
|
||||
winit = ["egui-winit", "glutin"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = [
|
||||
"convert_bytemuck",
|
||||
|
@ -44,33 +76,3 @@ wasm-bindgen = { version = "0.2" }
|
|||
|
||||
[dev-dependencies]
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence", "winit"]
|
||||
|
||||
# enable cut/copy/paste to OS clipboard.
|
||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||
clipboard = ["egui-winit/clipboard"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# enable opening links in a browser when an egui hyperlink is clicked.
|
||||
links = ["egui-winit/links"]
|
||||
|
||||
# enable code for saving state
|
||||
persistence = [
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
"epi", # also implied by the lines below, see https://github.com/rust-lang/cargo/issues/8832
|
||||
"epi/file_storage",
|
||||
"epi/persistence",
|
||||
]
|
||||
|
||||
# experimental support for a screen reader
|
||||
screen_reader = ["egui-winit/screen_reader"]
|
||||
|
||||
# enable glutin/winit integration.
|
||||
# if you want to use glow painter on web disable this feature.
|
||||
winit = ["egui-winit", "glutin"]
|
||||
|
|
|
@ -25,6 +25,27 @@ all-features = true
|
|||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "glow"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# Use glow as the renderer.
|
||||
glow = ["egui_glow", "egui_glow/epi"]
|
||||
|
||||
# Alternative to the glow renderer.
|
||||
webgl = []
|
||||
|
||||
# enable persisting egui memory
|
||||
persistence = ["egui/persistence", "ron", "serde"]
|
||||
|
||||
# enable screen reader support (requires `ctx.options().screen_reader = true;`)
|
||||
screen_reader = ["tts"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = [
|
||||
"convert_bytemuck",
|
||||
|
@ -47,22 +68,6 @@ ron = { version = "0.7", optional = true }
|
|||
serde = { version = "1", optional = true }
|
||||
tts = { version = "0.20", optional = true } # feature screen_reader
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "glow"]
|
||||
|
||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
||||
# If you plan on specifying your own fonts you may disable this feature.
|
||||
default_fonts = ["egui/default_fonts"]
|
||||
|
||||
# Use glow as the renderer.
|
||||
glow = ["egui_glow", "egui_glow/epi"]
|
||||
|
||||
# Alternative to the glow renderer.
|
||||
webgl = []
|
||||
|
||||
persistence = ["egui/persistence", "ron", "serde"]
|
||||
screen_reader = ["tts"] # experimental
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.52"
|
||||
features = [
|
||||
|
|
|
@ -23,10 +23,6 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
bytemuck = { version = "1.7.2", features = ["derive"], optional = true }
|
||||
mint = { version = "0.5.6", optional = true }
|
||||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
@ -35,3 +31,9 @@ default = []
|
|||
extra_debug_asserts = []
|
||||
# Always enable additional checks.
|
||||
extra_asserts = []
|
||||
|
||||
|
||||
[dependencies]
|
||||
bytemuck = { version = "1.7.2", features = ["derive"], optional = true }
|
||||
mint = { version = "0.5.6", optional = true }
|
||||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
|
|
|
@ -25,17 +25,6 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
emath = { version = "0.16.0", path = "../emath" }
|
||||
|
||||
ab_glyph = "0.2.11"
|
||||
ahash = { version = "0.7", features = ["std"], default-features = false }
|
||||
atomic_refcell = { version = "0.1", optional = true } # Used instead of parking_lot when you are always using epaint in a single thread. About as fast as parking_lot. Panics on multi-threaded use.
|
||||
bytemuck = { version = "1.7.2", features = ["derive"], optional = true }
|
||||
cint = { version = "^0.2.2", optional = true }
|
||||
nohash-hasher = "0.2"
|
||||
parking_lot = { version = "0.11", optional = true } # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
|
||||
serde = { version = "1", features = ["derive", "rc"], optional = true }
|
||||
|
||||
[features]
|
||||
default = ["default_fonts", "multi_threaded"]
|
||||
|
@ -64,9 +53,23 @@ single_threaded = ["atomic_refcell"]
|
|||
# It comes with a minor performance impact.
|
||||
multi_threaded = ["parking_lot"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
emath = { version = "0.16.0", path = "../emath" }
|
||||
|
||||
ab_glyph = "0.2.11"
|
||||
ahash = { version = "0.7", features = ["std"], default-features = false }
|
||||
atomic_refcell = { version = "0.1", optional = true } # Used instead of parking_lot when you are always using epaint in a single thread. About as fast as parking_lot. Panics on multi-threaded use.
|
||||
bytemuck = { version = "1.7.2", features = ["derive"], optional = true }
|
||||
cint = { version = "^0.2.2", optional = true }
|
||||
nohash-hasher = "0.2"
|
||||
parking_lot = { version = "0.11", optional = true } # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
|
||||
serde = { version = "1", features = ["derive", "rc"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.3", default-features = false }
|
||||
|
||||
|
||||
[[bench]]
|
||||
name = "benchmark"
|
||||
harness = false
|
||||
|
|
|
@ -23,6 +23,15 @@ all-features = true
|
|||
|
||||
[lib]
|
||||
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# Enable the file_storage module for storing data to disk.
|
||||
file_storage = ["directories-next", "ron", "serde"]
|
||||
# Persist native window options and egui memory
|
||||
persistence = ["ron", "serde", "egui/persistence"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.16.0", path = "../egui", default-features = false, features = ["single_threaded"] }
|
||||
tracing = "0.1"
|
||||
|
@ -30,8 +39,3 @@ tracing = "0.1"
|
|||
directories-next = { version = "2", optional = true }
|
||||
ron = { version = "0.7", optional = true }
|
||||
serde = { version = "1", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
file_storage = ["directories-next", "ron", "serde"]
|
||||
persistence = ["ron", "serde", "egui/persistence"]
|
||||
|
|
Loading…
Reference in a new issue