WebAssembly backend for the page word scanner. Replaces the JS
O(text × words) indexOf loop with a single-pass Aho-Corasick scan.
{ index, word, end }, the contract the JS caller in
src/content-scripts/matcherFacade.ts consumes.DOM traversal and rendering stay in JS; this crate is pure text computation.
#[wasm_bindgen] exports (see src/lib.rs):
set_words(active, deleted) — (re)build cached automata.find_matches(text) — matches against active words.find_deleted_matches(text) — matches against deleted words.Match semantics: leftmost-longest, non-overlapping, ASCII case-insensitive,
both flanks non-[a-zA-Z]. Returned word preserves the source casing.
cargo test -p wasm-matcher runs native unit tests. Browser artifacts are
produced by scripts/build-wasm.sh (wasm32 release + wasm-bindgen) and
inlined as base64 by scripts/inline-wasm.ts. See repo AGENTS.md.