Parameter struct
pub struct Params<N> {
x: bigfloat::BigFloat<N>,
y: bigfloat::BigFloat<N>,
step: bigfloat::BigFloat<N>,
max_iter: u32,
}
Mandelbrot Example
The Mandelbrot set shows Zust generics, BigFloat arithmetic, GPU kernel shape, typed vector output, and the SPIR-V, Metal, and Vulkan backend path.

pub struct Params<N> {
x: bigfloat::BigFloat<N>,
y: bigfloat::BigFloat<N>,
step: bigfloat::BigFloat<N>,
max_iter: u32,
}
The GPU thread locates a sample, converts its pixel offset into BigFloat, and adds that offset to the high-precision center coordinate.
let px = group[0] * 16u32 + local[0];
let py = group[1] * 16u32 + local[1];
let x_bf = params.x.add(x_offset.mul(params.step));
let y_bf = params.y.add(y_offset.mul(params.step));
The recurrence is `z = z² + c`. When `zx² + zy² > 4`, the point escapes; the escape count becomes the basis for smooth coloring.
In deep zooms, the complex-plane distance between neighboring pixels can be smaller than ordinary `f32` can preserve. BigFloat keeps the offsets meaningful.
cargo run -p vm-spirv --example mandelbrot
MANDEL_ZS=zusts/gpu/mandelbrot_bigfloat8.zs \
MANDEL_MODULE=mandelbrot_bigfloat8 \
cargo run -p vulkan --example run_mandel