ab_proof_of_space_gpu/
lib.rs

1//! Proof of space plotting utilities for GPU (Vulkan/Metal).
2//!
3//! Similarly to `ab-proof-of-space`, max supported `K` within range `15..=24` due to internal data
4//! structures used (`ab-proof-of-space` also supports `K=25`, but this crate doesn't for now).
5
6#![cfg_attr(target_arch = "spirv", no_std)]
7#![feature(
8    array_windows,
9    bigint_helper_methods,
10    generic_const_exprs,
11    ptr_as_ref_unchecked,
12    step_trait,
13    uint_bit_width
14)]
15#![expect(incomplete_features, reason = "generic_const_exprs")]
16#![cfg_attr(all(test, not(target_arch = "spirv")), feature(new_zeroed_alloc))]
17#![cfg_attr(
18    all(test, not(miri), not(target_arch = "spirv")),
19    feature(
20        const_convert,
21        const_trait_impl,
22        maybe_uninit_fill,
23        maybe_uninit_slice,
24        maybe_uninit_write_slice
25    )
26)]
27
28// This is used for benchmarks of isolated shaders externally, not for general use
29#[doc(hidden)]
30pub mod shader;
31
32// TODO: Remove gate after https://github.com/Rust-GPU/rust-gpu/pull/249
33#[cfg(not(target_arch = "spirv"))]
34use ab_core_primitives::pos::PosProof;
35
36// TODO: Remove gate after https://github.com/Rust-GPU/rust-gpu/pull/249
37#[cfg(not(target_arch = "spirv"))]
38const _: () = {
39    assert!(PosProof::K >= 15 && PosProof::K <= 24);
40};