Fearless SIMD v1.0 is a Rust crate that eliminates ad-hoc unsafe from SIMD programming while preserving top-tier performance and portability. It provides both high-level portable SIMD abstractions and safe, zero-overhead access to platform intrinsics so developers can mix portable code with low-level instructions when needed. For operations that behave differently across architectures (for example swizzles or floating-point max), it exposes both precise, platform-consistent variants and faster platform-dependent variants for cases where edge conditions are unlikely. The API supports expressing algorithms in terms of hardware-native vector widths as well as fixed-size vectors, and many implementations are highly tuned with upstream contributions to Rust and LLVM.
Memory safety rests on two small, auditable components: a kernel! macro that uses compiler target-feature support to call most intrinsics without unsafe, and a safe transmute module for load/store semantics inspired by bytemuck/zerocopy. That design keeps the rest of the codebase free of unsafe blocks. Ergonomics are improved by fearless_simd_macros v0.1, which supplies a simd macro for non-leaky function multiversioning, while preserving older patterns for compatibility. The release promises three years of security updates, a migration path to future features (f16, SVE, RISC-V Vector), and interoperability with std::simd when it stabilizes. The crate is already a dependency for dozens of crates and indirectly supports thousands more.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.