Fearless SIMD v1.0 is a Rust crate that provides portable, high-performance SIMD abstractions while removing the need for ad-hoc unsafe code. It offers both precise and fast variants for operations that differ across platforms (e.g., swizzles or floating-point max), supports writing algorithms in native hardware vector widths as well as fixed-size vectors, and lets users drop to platform intrinsics without overhead when needed. The implementation includes state-of-the-art portable operation implementations and upstream contributions to Rust and LLVM. Safety is achieved by isolating the unsafe surface to two audited building blocks: a kernel! macro that uses compiler target features to call most intrinsics without unsafe, and a safe transmute module for load/store semantics inspired by bytemuck/zerocopy; with those sound, the rest of the codebase is memory-safe.
Ergonomics are improved with fearless_simd_macros v0.1 and the #simd macro, which provides non-leaky function multiversioning so SIMD functions “just work” without inline fiddling or per-call overhead, though some boilerplate remains. The crate guarantees three years of security updates for v1.0, outlines upgrade paths for new types and architectures (f16, SVE, RISC‑V vectors), and plans to port to std::simd when it stabilizes. Fearless SIMD is already a direct dependency of 30 crates and indirectly used by over a thousand, with docs and examples available for adopters.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.