Rust 1.89+

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

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)].

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

incant! dispatches to the best available SIMD tier at runtime. Generate _v3, _neon, _wasm128, and _scalar variants with #[magetypes] — the macro handles detection, cfg guards, and fallback.

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"
[dependencies] archmage = "0.9" magetypes = "0.9"
docs.rs

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