1#![cfg_attr(docsrs, feature(doc_cfg))]
3
4#[cfg(feature = "wgpu-bare")]
5pub use iced_wgpu as wgpu;
6
7pub mod fallback;
8
9pub use iced_graphics as graphics;
10pub use iced_graphics::core;
11
12#[cfg(feature = "geometry")]
13pub use iced_graphics::geometry;
14
15pub type Renderer = renderer::Renderer;
19
20pub type Compositor = renderer::Compositor;
24
25#[cfg(all(feature = "wgpu-bare", feature = "tiny-skia"))]
26mod renderer {
27 pub type Renderer = crate::fallback::Renderer<iced_wgpu::Renderer, iced_tiny_skia::Renderer>;
28
29 pub type Compositor = crate::fallback::Compositor<
30 iced_wgpu::window::Compositor,
31 iced_tiny_skia::window::Compositor,
32 >;
33}
34
35#[cfg(all(feature = "wgpu-bare", not(feature = "tiny-skia")))]
36mod renderer {
37 pub type Renderer = iced_wgpu::Renderer;
38 pub type Compositor = iced_wgpu::window::Compositor;
39}
40
41#[cfg(all(not(feature = "wgpu-bare"), feature = "tiny-skia"))]
42mod renderer {
43 pub type Renderer = iced_tiny_skia::Renderer;
44 pub type Compositor = iced_tiny_skia::window::Compositor;
45}
46
47#[cfg(not(any(feature = "wgpu-bare", feature = "tiny-skia")))]
48mod renderer {
49 #[cfg(not(debug_assertions))]
50 compile_error!(
51 "Cannot compile `iced_renderer` in release mode \
52 without a renderer feature enabled. \
53 Enable either the `wgpu` or `tiny-skia` feature, or both."
54 );
55
56 pub type Renderer = ();
57 pub type Compositor = ();
58}