Skip to main content

ps_anyrender_vello/
lib.rs

1//! A [`vello`] backend for the [`anyrender`] 2D drawing abstraction
2
3// `chunks_exact_to_as_chunks` is new in clippy 1.98 and suggests
4// `as_chunks_mut::<4>()` where `blur.rs` packs its uniform words. Not taken:
5// this workspace builds on an MSRV of 1.92, where that method does not exist,
6// so the suggestion trades a lint for a broken MSRV job. `unknown_lints` goes
7// with it because the lint does not exist before 1.98, and there the allow is
8// itself a warning that `-D warnings` turns into a failure.
9#![allow(unknown_lints)]
10#![allow(clippy::chunks_exact_to_as_chunks)]
11
12mod backdrop;
13mod blur;
14#[cfg(not(target_arch = "wasm32"))]
15mod image_renderer;
16mod scene;
17mod window_renderer;
18
19pub use backdrop::BackdropPool;
20#[cfg(not(target_arch = "wasm32"))]
21pub use image_renderer::VelloImageRenderer;
22pub use scene::VelloScenePainter;
23pub use wgpu_context::DeviceHandle;
24pub use window_renderer::{VelloRendererOptions, VelloWindowRenderer};
25
26pub use wgpu;
27
28use std::num::NonZeroUsize;
29
30#[cfg(target_os = "macos")]
31const DEFAULT_THREADS: Option<NonZeroUsize> = NonZeroUsize::new(1);
32#[cfg(not(target_os = "macos"))]
33const DEFAULT_THREADS: Option<NonZeroUsize> = None;