Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi_threaded feature as passthrough to avoid needing separate egui dependency. #63

Merged
merged 2 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
fail-fast: false
matrix:
features: [
'',
'multi_threaded',
'manage_clipboard',
'open_url',
'manage_clipboard,open_url',
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<EguiContext>) {
egui::Window::new("Hello").show(egui_context.ctx(), |ui| {
ui.label("world");
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<EguiContext>) {
//! egui::Window::new("Hello").show(egui_context.ctx(), |ui| {
//! ui.label("world");
Expand Down