$ memchr

v2.8.1

Provides extremely fast (uses SIMD on x86_64, aarch64 and wasm32) routines for 1, 2 or 3 byte search and single substring search.

Downloads: 987.6M
Recent: 207.3M
Versions: 45
Updated: May 27, 2026

Latest Update Summary

Crate

Name: memchr New version: 2.8.0 Release date: 2026-02-06T19:39:00.135701Z

Crate readme

Short description This library provides heavily optimized routines for string search primitives.

Long description The memchr crate provides routines for searching for 1, 2, or 3 bytes in both forward and reverse directions. It operates on &[u8] without regard to encoding, making it suitable for both UTF-8 and arbitrary byte searches. The library can be compiled without the standard library and supports SIMD-accelerated routines on various targets, falling back to SWAR techniques when necessary. The current minimum supported Rust version is 1.61.0, and the crate includes an extensive testing strategy with various benchmark classes.

Features • no_std compatibility • SIMD acceleration on x86_64, wasm32, and aarch64 targets • Minimum Rust version 1.61.0 • Heavily optimized substring search algorithms

Code Examples Add to Cargo.toml

 [dependencies]
memchr = { version = "2", default-features = false }

Linkshttps://crates.io/crates/memchrhttps://docs.rs/memchr

https://docs.rs/memchr/

Release info

Release version: N/A

Release description N/A

Code Examples N/A

Patch update: 2.8.0 → 2.8.1

$ DOWNLOADS TREND

589.9M987.6M

$ VERSION HISTORY

v2.8.1May 27, 2026
v2.8.0February 6, 2026
v2.7.6September 25, 2025

$ LINKS

$ INSTALL

cargo add memchr

Or add to Cargo.toml: memchr = "2.8.1"