Crate features / regex-automata
Feature flags · regex-automata 0.4.18 · from crates.io 2026-10-24
regex-automata features: what each one does, and the line to copy
Short answerregex-automata 0.4.18 has 30 features. By default it turns on std, syntax, perf, unicode, meta, nfa, dfa, hybrid; add default-features = false to start from nothing. It needs Rust 1.65 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
alloc | nothing else (a switch the code checks) | |
dfa | yes | dfa-build, dfa-search, dfa-onepass |
dfa-build | nfa-thompson, dfa-search | |
dfa-onepass | nfa-thompson | |
dfa-search | nothing else (a switch the code checks) | |
hybrid | yes | alloc, nfa-thompson |
internal-instrument | internal-instrument-pikevm | |
internal-instrument-pikevm | logging, std | |
logging | dep:log, aho-corasick?/logging, memchr?/logging | |
meta | yes | syntax, nfa-pikevm |
nfa | yes | nfa-thompson, nfa-pikevm, nfa-backtrack |
nfa-backtrack | nfa-thompson | |
nfa-pikevm | nfa-thompson | |
nfa-thompson | alloc | |
perf | yes | perf-inline, perf-literal |
perf-inline | nothing else (a switch the code checks) | |
perf-literal | perf-literal-substring, perf-literal-multisubstring | |
perf-literal-multisubstring | dep:aho-corasick | |
perf-literal-substring | aho-corasick?/perf-literal, dep:memchr | |
std | yes | regex-syntax?/std, memchr?/std, aho-corasick?/std, alloc |
syntax | yes | dep:regex-syntax, alloc |
unicode | yes | unicode-age, unicode-bool, unicode-case, unicode-gencat, unicode-perl, unicode-script, unicode-segment, unicode-word-boundary, regex-syntax?/unicode |
unicode-age | regex-syntax?/unicode-age | |
unicode-bool | regex-syntax?/unicode-bool | |
unicode-case | regex-syntax?/unicode-case | |
unicode-gencat | regex-syntax?/unicode-gencat | |
unicode-perl | regex-syntax?/unicode-perl | |
unicode-script | regex-syntax?/unicode-script | |
unicode-segment | regex-syntax?/unicode-segment | |
unicode-word-boundary | nothing else (a switch the code checks) |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version regex-automata declares (rust-version), and the release that changed it:
- 0.4.0 (2023-10-09): Rust 1.65
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p regex-automata --precise <version>, or use resolver 3, which picks compatible versions for you.
More on regex-automata
Real downloads, dependents and alternatives: regex-automata crate data (3.6M real downloads a day, 210 dependents).
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2021
Up next
Before you depend on itregex-automata crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?