summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-20 18:35:18 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-20 18:37:17 +0200
commit91c00e4abf0a21c2b10535a1672e017249cfbcee (patch)
tree04fa2cf17e3529981e5ed952f8d8f5ad50b64e4d
parent53f88fe2cf5de51aa1ffa043600cc2c467b8c8b8 (diff)
downloadiced-91c00e4abf0a21c2b10535a1672e017249cfbcee.tar.gz
iced-91c00e4abf0a21c2b10535a1672e017249cfbcee.tar.bz2
iced-91c00e4abf0a21c2b10535a1672e017249cfbcee.zip
Move `wgpu` re-export to root module
This seems to fix a `cargo doc` performance issue; and it makes more sense anyways.
-rw-r--r--examples/custom_shader/src/main.rs2
-rw-r--r--src/lib.rs3
-rw-r--r--widget/src/shader.rs1
3 files changed, 4 insertions, 2 deletions
diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs
index 5886f6bb..8c187d3c 100644
--- a/examples/custom_shader/src/main.rs
+++ b/examples/custom_shader/src/main.rs
@@ -3,7 +3,7 @@ mod scene;
use scene::Scene;
use iced::time::Instant;
-use iced::widget::shader::wgpu;
+use iced::wgpu;
use iced::widget::{center, checkbox, column, row, shader, slider, text};
use iced::window;
use iced::{Center, Color, Element, Fill, Subscription};
diff --git a/src/lib.rs b/src/lib.rs
index 91d8e53f..8f526cfd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -483,6 +483,9 @@ pub use iced_futures::stream;
#[cfg(feature = "highlighter")]
pub use iced_highlighter as highlighter;
+#[cfg(feature = "wgpu")]
+pub use iced_renderer::wgpu::wgpu;
+
mod error;
mod program;
diff --git a/widget/src/shader.rs b/widget/src/shader.rs
index 3c81f8ed..fa692336 100644
--- a/widget/src/shader.rs
+++ b/widget/src/shader.rs
@@ -18,7 +18,6 @@ use crate::renderer::wgpu::primitive;
use std::marker::PhantomData;
pub use crate::graphics::Viewport;
-pub use crate::renderer::wgpu::wgpu;
pub use primitive::{Primitive, Storage};
/// A widget which can render custom shaders with Iced's `wgpu` backend.