Archmage
Safely invoke your intrinsic power, using the tokens granted to you by the CPU. Portable kernels, explicit CPU capabilities, and safe SIMD.
Essential Features
Clean, minimal, and focused on content
No Unsafe in Your Code
Capability tokens prove CPU features at the type level. #[attune] compiles your function with those features, so its intrinsic calls need no unsafe, and your crate can keep #![forbid(unsafe_code)].
Auditable Performance
Place the hot loop inside its target-feature context. Inspect codegen and benchmark the complete kernel against the same numerical contract.
Every Platform
x86-64 (SSE2 through AVX-512), AArch64 (NEON through v3), and WASM SIMD128. Tokens compile on all platforms — summon() returns None on unsupported architectures.
Runtime Dispatch
attuned! dispatches to the best available SIMD tier at runtime. Generate _v3_t, _neon_t, _wasm128_t, and _scalar_t variants with #[attune(_*_t, define(f32x8))] — or emit a direct callable dispatcher with #[attune(dispatch)].
Magetypes
Optional SIMD vector types with natural Rust operators. f32x8 has eight logical lanes with +, -, *, /, FMA, comparisons, reductions, and transcendentals. Cross-platform polyfills included.
12,000+ Intrinsics Indexed
Every x86 and AArch64 intrinsic cataloged by token, safety status, and stability. Browse which intrinsics each token unlocks.
Quick Start
Add archmage to your project and start writing safe SIMD.
[dependencies]
archmage = "=0.9.33"
[dependencies]
archmage = "=0.9.33"
magetypes = "=0.9.33"
[dependencies]
archmage = "=0.9.33"
magetypes = "=0.9.33"
magemath = "0.1"
Start Writing Safe SIMD
Learn from complete image and codec kernels: generics, target-feature contexts, safe memory access, and measured ISA tradeoffs.
Read the Docs