Real-World Examples
Production patterns for writing cross-platform SIMD with magetypes generics
Start with complete, compiled call chains adapted from real crates in zen/:
- zenfilters: image-plane scaling — generated contexts, array chunks and scalar tail.
- zenblend: SrcOver — a generated caller and a reusable generic backend helper.
- zenwebp: add-green — the actual scalar-unrolled integer body inside generated contexts.
- linear-srgb: gamma decoding — vector approximation and scalar tail, with their accuracy distinction.
Each page gives a pinned source revision, the production call chain, and any
adaptations required to make the excerpt standalone. Rust fences are compiled directly by xtask/check_docs.py; the existing
magetypes/tests/doc_examples.rs adds numerical regression cases.
- Generic types and const modes — zenanalyze, zenavif, and zenpixels-convert specialization.
- Production codec and filter walkthroughs — convolution, blur, quantization, and color conversion in one place.
- Coverage and suspicious gaps — what actual zen usage supports, and what it does not.