Allow users to opt-out of default `winit` features (#3228)
* Do not enable winit features by default * Enable default winit features by default * Add x11 feature
This commit is contained in:
parent
d568d9f5d0
commit
7e035c6dd1
|
@ -61,7 +61,7 @@ jobs:
|
||||||
run: cargo check --locked --no-default-features --lib --all-targets -p epaint
|
run: cargo check --locked --no-default-features --lib --all-targets -p epaint
|
||||||
|
|
||||||
- name: check eframe --no-default-features
|
- name: check eframe --no-default-features
|
||||||
run: cargo check --locked --no-default-features --lib --all-targets -p eframe
|
run: cargo check --locked --no-default-features --features x11 --lib --all-targets -p eframe
|
||||||
|
|
||||||
- name: Test doc-tests
|
- name: Test doc-tests
|
||||||
run: cargo test --doc --all-features
|
run: cargo test --doc --all-features
|
||||||
|
|
|
@ -27,7 +27,14 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["accesskit", "default_fonts", "glow"]
|
default = [
|
||||||
|
"accesskit",
|
||||||
|
"default_fonts",
|
||||||
|
"glow",
|
||||||
|
"wayland",
|
||||||
|
"winit/default",
|
||||||
|
"x11",
|
||||||
|
]
|
||||||
|
|
||||||
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
|
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
|
||||||
accesskit = ["egui/accesskit", "egui-winit/accesskit"]
|
accesskit = ["egui/accesskit", "egui-winit/accesskit"]
|
||||||
|
@ -42,6 +49,9 @@ glow = ["dep:glow", "dep:egui_glow", "dep:glutin", "dep:glutin-winit"]
|
||||||
## Enables wayland support and fixes clipboard issue.
|
## Enables wayland support and fixes clipboard issue.
|
||||||
wayland = ["egui-winit/wayland"]
|
wayland = ["egui-winit/wayland"]
|
||||||
|
|
||||||
|
## Enables compiling for x11.
|
||||||
|
x11 = ["egui-winit/x11"]
|
||||||
|
|
||||||
## Enable saving app state to disk.
|
## Enable saving app state to disk.
|
||||||
persistence = [
|
persistence = [
|
||||||
"directories-next",
|
"directories-next",
|
||||||
|
@ -109,7 +119,7 @@ image = { version = "0.24", default-features = false, features = [
|
||||||
"png",
|
"png",
|
||||||
] } # Needed for app icon
|
] } # Needed for app icon
|
||||||
raw-window-handle = { version = "0.5.0" }
|
raw-window-handle = { version = "0.5.0" }
|
||||||
winit = "0.28.1"
|
winit = { version = "0.28.1", default-features = false }
|
||||||
|
|
||||||
# optional native:
|
# optional native:
|
||||||
directories-next = { version = "2", optional = true }
|
directories-next = { version = "2", optional = true }
|
||||||
|
|
|
@ -50,7 +50,7 @@ wgpu = "0.16.0"
|
||||||
## Enable this when generating docs.
|
## Enable this when generating docs.
|
||||||
document-features = { version = "0.2", optional = true }
|
document-features = { version = "0.2", optional = true }
|
||||||
|
|
||||||
winit = { version = "0.28", optional = true }
|
winit = { version = "0.28", default-features = false, optional = true }
|
||||||
|
|
||||||
# Native:
|
# Native:
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
|
|
|
@ -18,7 +18,7 @@ all-features = true
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["clipboard", "links", "wayland", "winit/default"]
|
default = ["clipboard", "links", "wayland", "winit/default", "x11"]
|
||||||
|
|
||||||
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
|
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
|
||||||
accesskit = ["accesskit_winit", "egui/accesskit"]
|
accesskit = ["accesskit_winit", "egui/accesskit"]
|
||||||
|
@ -42,6 +42,9 @@ serde = ["egui/serde", "dep:serde"]
|
||||||
## Enables Wayland support.
|
## Enables Wayland support.
|
||||||
wayland = ["winit/wayland"]
|
wayland = ["winit/wayland"]
|
||||||
|
|
||||||
|
## Enables compiling for x11.
|
||||||
|
x11 = ["winit/x11"]
|
||||||
|
|
||||||
# Allow crates to choose an android-activity backend via Winit
|
# 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
|
# - 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)
|
# rely on Winit to pull in a suitable version (unlike most Rust crates, any version conflicts won't link)
|
||||||
|
|
Loading…
Reference in New Issue