ironaccelerator_vulkan/lib.rs
1//! # `ironaccelerator-vulkan`
2//!
3//! Vulkan 1.3 Compute backend. Targets cross-vendor discrete and integrated
4//! GPUs that expose a Vulkan ICD, plus the Rust→WASM compute path on browsers
5//! that expose WebGPU on top of a Vulkan driver.
6//!
7//! The crate is deliberately thin: enumerate physical devices, report their
8//! compute queue family + subgroup + FP16/INT8 support as capability bits, and
9//! let higher layers build pipelines out of SPIR-V modules. Shader translation
10//! is not this crate's job — bring your own SPIR-V, the same way the CUDA
11//! backend takes PTX. It intentionally
12//! avoids wrapping every Vulkan object in a safe RAII type — the same
13//! "throughput over guard-rails" stance the rest of IronAccelerator takes.
14
15#![warn(missing_docs)]
16#![allow(clippy::missing_safety_doc)]
17
18pub mod backend;
19#[cfg(not(target_arch = "wasm32"))]
20pub mod compute;
21#[cfg(not(target_arch = "wasm32"))]
22pub mod drv;
23
24pub use backend::{VulkanBackend, VULKAN_BACKEND};
25#[cfg(not(target_arch = "wasm32"))]
26pub use compute::{Buffer, ComputePipeline, Context};
27#[cfg(not(target_arch = "wasm32"))]
28pub use drv::{enumerate, PhysicalDevice};
29
30/// Register the Vulkan backend into the given registry. Idempotent.
31pub fn register(reg: &mut ironaccelerator_core::BackendRegistry) {
32 reg.register(&VULKAN_BACKEND);
33}