From f023073cab932860bec5d5b2214c469874102595 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Wed, 4 Oct 2023 12:00:10 +1100 Subject: [PATCH] error if attempting to build with multiple renderers --- lib/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 5768fea..f46ead8 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -26,6 +26,9 @@ use std::{ sync::{mpsc::Receiver, Arc, Mutex}, }; +#[cfg(all(feature = "vulkan", feature = "pixels"))] +compile_error!("select only one rendering backend!"); + #[allow(unused_attributes)] #[cfg(any(feature = "vulkan-renderer", feature = "pixels-renderer"))] #[cfg_attr(feature = "pixels-renderer", path = "renderer/pixels.rs")]