mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
eframe has features for selecting between x11 and wayland. eframe does not forward the features to glutin. This makes glutin always compile with both backends enabled. This change forwards the feature. This allows users of egui to compile less dependencies when they only need one of x11, wayland. To understand this change, read the glutin Cargo.toml [1] and the glutin build.rs [2]. You always have to enable glutin's glx feature with the x11 feature. The other default features (egl, wgl) stay enabled. This is intentional so that everything continues to work as before. We could further minimize when egl and wgl are enabled, but that is not part of this change. There is little reason to do so because those feature already only add dependencies when you compile glutin for the right platform (for example wgl on windows). [1] https://github.com/rust-windowing/glutin/blob/v0.32.1/glutin/Cargo.toml [2] https://github.com/rust-windowing/glutin/blob/v0.32.1/glutin/build.rs
87 lines
2.5 KiB
TOML
87 lines
2.5 KiB
TOML
[package]
|
|
name = "egui_glow"
|
|
version.workspace = true
|
|
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
|
description = "Bindings for using egui natively using the glow library"
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
homepage = "https://github.com/emilk/egui/tree/master/crates/egui_glow"
|
|
license.workspace = true
|
|
readme = "README.md"
|
|
repository = "https://github.com/emilk/egui/tree/master/crates/egui_glow"
|
|
categories = ["gui", "game-development"]
|
|
keywords = ["glow", "egui", "gui", "gamedev"]
|
|
include = [
|
|
"../LICENSE-APACHE",
|
|
"../LICENSE-MIT",
|
|
"**/*.rs",
|
|
"Cargo.toml",
|
|
"src/shader/*.glsl",
|
|
]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--generate-link-to-definition"]
|
|
|
|
[features]
|
|
default = []
|
|
|
|
## For the `winit` integration:
|
|
## 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"]
|
|
|
|
## For the `winit` integration:
|
|
## enable opening links in a browser when an egui hyperlink is clicked.
|
|
links = ["egui-winit?/links"]
|
|
|
|
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
|
|
puffin = ["dep:puffin", "egui-winit?/puffin", "egui/puffin"]
|
|
|
|
## Enable [`winit`](https://docs.rs/winit) integration. On Linux, requires either `wayland` or `x11`
|
|
winit = ["egui-winit", "dep:winit"]
|
|
|
|
## Enables Wayland support for winit.
|
|
wayland = ["winit?/wayland"]
|
|
|
|
## Enables x11 support for winit.
|
|
x11 = ["winit?/x11"]
|
|
|
|
|
|
[dependencies]
|
|
egui = { workspace = true, default-features = false, features = ["bytemuck"] }
|
|
egui-winit = { workspace = true, optional = true, default-features = false }
|
|
|
|
ahash.workspace = true
|
|
bytemuck.workspace = true
|
|
glow.workspace = true
|
|
log.workspace = true
|
|
memoffset = "0.9"
|
|
|
|
#! ### Optional dependencies
|
|
## Enable this when generating docs.
|
|
document-features = { workspace = true, optional = true }
|
|
|
|
# Native:
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
puffin = { workspace = true, optional = true }
|
|
winit = { workspace = true, optional = true, default-features = false, features = ["rwh_06"] }
|
|
|
|
# Web:
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
web-sys = { workspace = true, features = ["console"] }
|
|
wasm-bindgen.workspace = true
|
|
|
|
|
|
[dev-dependencies]
|
|
glutin = { workspace = true, default-features = true } # examples/pure_glow
|
|
glutin-winit = { workspace = true, default-features = true }
|
|
|
|
[[example]]
|
|
name = "pure_glow"
|
|
required-features = ["winit", "egui/default_fonts"]
|