Archmage
Safely invoke your intrinsic power, using the tokens granted to you by the CPU. Zero overhead. Zero unsafe. Full SIMD.
Essential Features
Clean, minimal, and focused on content
Zero Unsafe
Capability tokens prove CPU features at the type level. #[arcane] enables #[target_feature] so intrinsics are safe. Your crate uses #![forbid(unsafe_code)].
Zero Overhead
Generates identical assembly to hand-written #[target_feature] + unsafe. The safety abstractions exist only at compile time — at runtime, you get raw SIMD instructions.
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
incant! dispatches to the best available SIMD tier at runtime. Write _v3, _neon, _wasm128, and _scalar variants — the macro handles detection, cfg guards, and fallback.
Magetypes (Experimental)
Optional SIMD vector types with natural Rust operators. f32x8 wraps __m256 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.
Start Writing Safe SIMD
Archmage is stable, battle-tested, and generates identical assembly to hand-written unsafe code. Magetypes adds ergonomic vector types if you want them.
Read the Docs