From a80ed6bab7ac4a70342d9330e39b68199ae7caaa Mon Sep 17 00:00:00 2001 From: Calin P <50150016+wyvernbw@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:00:02 +0300 Subject: [PATCH] Eframe: make webbrowser dependency optional (#8372) * Closes #8371 * [x] I have followed the instructions in the PR template Adds a `link` feature to eframe to allow disabling links on egui-winit. The feature is enabled by default so nothing changes for existing users of eframe. --- crates/eframe/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 2e21fcc19..60b796bc5 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -28,6 +28,7 @@ workspace = true default = [ "accesskit", "default_fonts", + "links", "wayland", # Required for Linux support (including CI!) "web_screen_reader", "wgpu", @@ -122,6 +123,9 @@ __screenshot = [] ## and capture screenshots. Off unless the env var is set; no-op on wasm. inspection = ["dep:egui_inspection", "accesskit"] +## Enables the `links` feature on `egui-winit`, allowing for links to open in browser. +links = ["egui-winit/links"] + [dependencies] egui = { workspace = true, default-features = false, features = ["bytemuck"] } @@ -145,7 +149,7 @@ serde = { workspace = true, optional = true } # ------------------------------------------- # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { workspace = true, default-features = false, features = ["clipboard", "links"] } +egui-winit = { workspace = true, default-features = false, features = ["clipboard"] } image = { workspace = true, features = ["png"] } # Needed for app icon winit = { workspace = true, default-features = false, features = ["rwh_06"] }