Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust kernels for Metal

metal-oxide compiles ordinary Rust functions into Metal compute kernels. The host uses stable Rust, typed buffers and lazy launch operations. Kernel compilation uses a separate pinned nightly and Apple’s Metal compiler.

Start with installation and the first kernel. The examples in this book are included from the repository’s executable examples; their hardware tests are explicit, separate from portable tests.

Alpha releases are published on crates.io; installation names the current version. The API can change between alpha releases.

Execution evidence

The full hardware suite has execution evidence on these devices only:

GPUmacOSXcodeNative APIs
M4 Max26.226.6classic Metal and Metal 4
Apple Paravirtual device in GitHub-hosted M1 VMs15.7 and 26.616.4 and 26.6classic Metal

Capability checks describe requirements, not proof of execution on every GPU family. The Paravirtual device lacks the Metal 4 family and Apple7 matrix support. Acquire/release atomics have compiler and capability-gate tests, but hardware validation is pending. Metal Performance Primitives (MPP) is a benchmark reference; Rust kernels expose SIMD-group matrices and do not expose a tensor API.