From 91c00e4abf0a21c2b10535a1672e017249cfbcee Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 20 Sep 2024 18:35:18 +0200 Subject: Move `wgpu` re-export to root module This seems to fix a `cargo doc` performance issue; and it makes more sense anyways. --- examples/custom_shader/src/main.rs | 2 +- src/lib.rs | 3 +++ widget/src/shader.rs | 1 - 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. -- cgit