diff options
author | 2024-05-22 12:36:04 +0200 | |
---|---|---|
committer | 2024-05-22 12:36:04 +0200 | |
commit | 468794d918eb06c1dbebb33c32b10017ad335f05 (patch) | |
tree | a9f0c7c13f780cde69fd66afb571218c80448131 /renderer | |
parent | d92e0f7bba8959384467048c7eca84b4b8a7195f (diff) | |
download | iced-468794d918eb06c1dbebb33c32b10017ad335f05.tar.gz iced-468794d918eb06c1dbebb33c32b10017ad335f05.tar.bz2 iced-468794d918eb06c1dbebb33c32b10017ad335f05.zip |
Produce a compile error in `iced_renderer` when no backend is enabled
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/renderer/src/lib.rs b/renderer/src/lib.rs index 056da5ed..220542e1 100644 --- a/renderer/src/lib.rs +++ b/renderer/src/lib.rs @@ -48,6 +48,13 @@ mod renderer { #[cfg(not(any(feature = "wgpu", feature = "tiny-skia")))] mod renderer { + #[cfg(not(debug_assertions))] + compile_error!( + "Cannot compile `iced_renderer` in release mode \ + without a renderer feature enabled. \ + Enable either the `wgpu` or `tiny-skia` feature, or both." + ); + pub type Renderer = (); pub type Compositor = (); } |