#![deny(clippy::trivially_copy_pass_by_ref)]
pub use piet::*;
cfg_if::cfg_if! {
if #[cfg(any(feature = "web", target_arch = "wasm32"))] {
#[path = "web_back.rs"]
mod backend;
} else if #[cfg(any(target_os = "linux", target_os = "openbsd", target_os = "freebsd", target_os = "netbsd"))] {
#[path = "cairo_back.rs"]
mod backend;
} else if #[cfg(any(target_os = "macos", target_os = "ios"))] {
#[path = "cg_back.rs"]
mod backend;
} else if #[cfg(target_os = "windows")] {
#[path = "direct2d_back.rs"]
mod backend;
} else {
compile_error!("could not select an appropriate backend");
}
}
pub use backend::*;
#[cfg(test)]
mod test {
use super::*;
use static_assertions as sa;
#[allow(dead_code)]
struct Types<'a> {
piet: Piet<'a>,
brush: Brush,
piet_text: PietText,
piet_text_layout: PietTextLayout,
piet_text_layout_builder: PietTextLayoutBuilder,
image: PietImage,
}
sa::assert_impl_all!(Device: Send);
sa::assert_not_impl_any!(Device: Sync);
}