| 1 |
[package] |
| 2 |
name = "regex-automata" |
| 3 |
version = "0.4.6" #:version |
| 4 |
authors = ["The Rust Project Developers", "Andrew Gallant <[email protected]>"] |
| 5 |
description = "Automata construction and matching using regular expressions." |
| 6 |
documentation = "https://docs.rs/regex-automata" |
| 7 |
repository = "https://github.com/rust-lang/regex/tree/master/regex-automata" |
| 8 |
readme = "README.md" |
| 9 |
keywords = ["regex", "dfa", "automata", "automaton", "nfa"] |
| 10 |
license = "MIT OR Apache-2.0" |
| 11 |
categories = ["text-processing"] |
| 12 |
edition = "2021" |
| 13 |
autoexamples = false |
| 14 |
rust-version = "1.65" |
| 15 |
|
| 16 |
[lib] |
| 17 |
bench = false |
| 18 |
|
| 19 |
# This crate has many many many features. See the crate docs for a description |
| 20 |
# of each and when you might want to use them. |
| 21 |
[features] |
| 22 |
default = ["std", "syntax", "perf", "unicode", "meta", "nfa", "dfa", "hybrid"] |
| 23 |
std = ["regex-syntax?/std", "memchr?/std", "aho-corasick?/std", "alloc"] |
| 24 |
alloc = [] |
| 25 |
logging = ["dep:log", "aho-corasick?/logging", "memchr?/logging"] |
| 26 |
|
| 27 |
syntax = ["dep:regex-syntax", "alloc"] |
| 28 |
|
| 29 |
meta = ["syntax", "nfa-pikevm"] |
| 30 |
|
| 31 |
nfa = ["nfa-thompson", "nfa-pikevm", "nfa-backtrack"] |
| 32 |
nfa-thompson = ["alloc"] |
| 33 |
nfa-pikevm = ["nfa-thompson"] |
| 34 |
nfa-backtrack = ["nfa-thompson"] |
| 35 |
|
| 36 |
dfa = ["dfa-build", "dfa-search", "dfa-onepass"] |
| 37 |
dfa-build = ["nfa-thompson", "dfa-search"] |
| 38 |
dfa-search = [] |
| 39 |
dfa-onepass = ["nfa-thompson"] |
| 40 |
|
| 41 |
hybrid = ["alloc", "nfa-thompson"] |
| 42 |
|
| 43 |
perf = ["perf-inline", "perf-literal"] |
| 44 |
perf-inline = [] |
| 45 |
perf-literal = ["perf-literal-substring", "perf-literal-multisubstring"] |
| 46 |
perf-literal-substring = ["aho-corasick?/perf-literal", "dep:memchr"] |
| 47 |
perf-literal-multisubstring = ["std", "dep:aho-corasick"] |
| 48 |
|
| 49 |
# Enables all Unicode features. This expands if new Unicode features are added. |
| 50 |
unicode = [ |
| 51 |
"unicode-age", |
| 52 |
"unicode-bool", |
| 53 |
"unicode-case", |
| 54 |
"unicode-gencat", |
| 55 |
"unicode-perl", |
| 56 |
"unicode-script", |
| 57 |
"unicode-segment", |
| 58 |
"unicode-word-boundary", |
| 59 |
"regex-syntax?/unicode", |
| 60 |
] |
| 61 |
# Enables use of the `Age` property, e.g., `\p{Age:3.0}`. |
| 62 |
unicode-age = ["regex-syntax?/unicode-age"] |
| 63 |
# Enables use of a smattering of boolean properties, e.g., `\p{Emoji}`. |
| 64 |
unicode-bool = ["regex-syntax?/unicode-bool"] |
| 65 |
# Enables Unicode-aware case insensitive matching, e.g., `(?i)β`. |
| 66 |
unicode-case = ["regex-syntax?/unicode-case"] |
| 67 |
# Enables Unicode general categories, e.g., `\p{Letter}` or `\pL`. |
| 68 |
unicode-gencat = ["regex-syntax?/unicode-gencat"] |
| 69 |
# Enables Unicode-aware Perl classes corresponding to `\w`, `\s` and `\d`. |
| 70 |
unicode-perl = ["regex-syntax?/unicode-perl"] |
| 71 |
# Enables Unicode scripts and script extensions, e.g., `\p{Greek}`. |
| 72 |
unicode-script = ["regex-syntax?/unicode-script"] |
| 73 |
# Enables Unicode segmentation properties, e.g., `\p{gcb=Extend}`. |
| 74 |
unicode-segment = ["regex-syntax?/unicode-segment"] |
| 75 |
# Enables Unicode word boundary support. If this is enabled with unicode-perl, |
| 76 |
# then data tables from regex-syntax are used. Otherwise, a new data table |
| 77 |
# inside regex-automata will be included. |
| 78 |
unicode-word-boundary = [] |
| 79 |
|
| 80 |
# These are strictly internal features that may be removed or changed in |
| 81 |
# non-compatible ways. |
| 82 |
internal-instrument = ["internal-instrument-pikevm"] |
| 83 |
internal-instrument-pikevm = ["logging", "std"] |
| 84 |
|
| 85 |
[dependencies] |
| 86 |
aho-corasick = { version = "1.0.0", optional = true, default-features = false } |
| 87 |
log = { version = "0.4.14", optional = true } |
| 88 |
memchr = { version = "2.6.0", optional = true, default-features = false } |
| 89 |
regex-syntax = { path = "../regex-syntax", version = "0.8.2", optional = true, default-features = false } |
| 90 |
|
| 91 |
[dev-dependencies] |
| 92 |
anyhow = "1.0.69" |
| 93 |
bstr = { version = "1.3.0", default-features = false, features = ["std"] } |
| 94 |
doc-comment = "0.3.3" |
| 95 |
quickcheck = { version = "1.0.3", default-features = false } |
| 96 |
regex-test = { path = "../regex-test", version = "0.1.0" } |
| 97 |
|
| 98 |
[dev-dependencies.env_logger] |
| 99 |
version = "0.9.3" |
| 100 |
default-features = false |
| 101 |
features = ["atty", "humantime", "termcolor"] |
| 102 |
|
| 103 |
# We put these tests here because they are written primarily against the |
| 104 |
# regex-automata API, and in particular use regex-automata features for |
| 105 |
# conditional compilation. If we moved these up as tests on 'regex' proper, |
| 106 |
# then we'd need to duplicate regex-automata's complex features on 'regex' too, |
| 107 |
# which I really do not want to do. |
| 108 |
[[test]] |
| 109 |
path = "tests/lib.rs" |
| 110 |
name = "integration" |