From d7a9e5b673ffe34d09bdf2e73eb96c23fb92018e Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 27 Jan 2022 08:22:20 -0600 Subject: [PATCH 1/2] Add `multi_threaded` feature as passthrough to avoid needing separate egui dependency. --- Cargo.toml | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index be28e267d..ad8167ca1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ no-default-features = true # clipboard crate fails the build currently https://g [features] default = ["manage_clipboard", "open_url"] manage_clipboard = ["clipboard", "thread_local"] +multi_threaded = ["egui/multi_threaded"] open_url = ["webbrowser"] [dependencies] diff --git a/README.md b/README.md index c1b24fbe1..67daa1acf 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ fn main() { // Note the usage of `ResMut`. Even though `ctx` method doesn't require // mutability, accessing the context from different threads will result -// into panic if you don't enable `egui/multi_threaded` feature. +// into panic if you don't enable `multi_threaded` feature. fn ui_example(egui_context: ResMut) { egui::Window::new("Hello").show(egui_context.ctx(), |ui| { ui.label("world"); From 46c4bf44a4f7f8a7c38e10d34f0282f89754f604 Mon Sep 17 00:00:00 2001 From: mvlabat Date: Sat, 29 Jan 2022 13:50:08 +0200 Subject: [PATCH 2/2] Add multi_threaded to the CI cehck, update the docs --- .github/workflows/check.yml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c89db8ddd..0b8ba7b5c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -77,7 +77,7 @@ jobs: fail-fast: false matrix: features: [ - '', + 'multi_threaded', 'manage_clipboard', 'open_url', 'manage_clipboard,open_url', diff --git a/src/lib.rs b/src/lib.rs index 6eac00818..898b4b95b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,7 @@ //! //! // Note the usage of `ResMut`. Even though `ctx` method doesn't require //! // mutability, accessing the context from different threads will result -//! // into panic if you don't enable `egui/multi_threaded` feature. +//! // into panic if you don't enable `multi_threaded` feature. //! fn ui_example(egui_context: Res) { //! egui::Window::new("Hello").show(egui_context.ctx(), |ui| { //! ui.label("world");