Compatibility

Function names alone do not determine match selection. Choose the match rules explicitly when porting.

Rust aho-corasick

This libraryRust counterpart
find_all, find_iterfind_overlapping_iter
find_leftmost_longestfind_iter with MatchKind::LeftmostLongest
memis_match
Stream.feed_nonoverlappingEarliest-end selection, like stream_find_iter with Standard

Rust's find_iter is non-overlapping; this library's find_iter includes overlaps. This library specifies same-end ties as longest first, then lowest pattern index. The table does not claim identical ordering in every Rust configuration.

Streaming and match kinds

Rust 1.1.5 supports streaming only with MatchKind::Standard. This library also provides Stream.Leftmost_longest and Stream.Replace, using bounded lookahead and an end-of-input flush.

There is no leftmost-first mode. Pattern order only breaks ties for identical match spans; it does not let a shorter pattern outrank a longer one.

Before porting

Conformance and differential checks

The test suite ports vectors from Rust aho-corasick, daachorse, and pyahocorasick. A CI harness also compares 20,000 generated cases with Rust aho-corasick 1.1.5, pyahocorasick 2.3.1, and ahocorasick_rs 1.0.3.

Every shared Rust mode matched, including order. The Python results and known iter_long differences are documented in the harness report.

Scope

These results cover the pinned versions and generated cases above; they are not a compatibility claim for every implementation version.

Source: Rust 1.1.5 match-kind documentation.