1[package]
2name = "regex-automata"
3version = "0.4.6" #:version
4authors = ["The Rust Project Developers", "Andrew Gallant <jamslam@gmail.com>"]
5description = "Automata construction and matching using regular expressions."
6documentation = "https://docs.rs/regex-automata"
7repository = "https://github.com/rust-lang/regex/tree/master/regex-automata"
8readme = "README.md"
9keywords = ["regex", "dfa", "automata", "automaton", "nfa"]
10license = "MIT OR Apache-2.0"
11categories = ["text-processing"]
12edition = "2021"
13autoexamples = false
14rust-version = "1.65"
15
16[lib]
17bench = 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]
22default = ["std", "syntax", "perf", "unicode", "meta", "nfa", "dfa", "hybrid"]
23std = ["regex-syntax?/std", "memchr?/std", "aho-corasick?/std", "alloc"]
24alloc = []
25logging = ["dep:log", "aho-corasick?/logging", "memchr?/logging"]
26
27syntax = ["dep:regex-syntax", "alloc"]
28
29meta = ["syntax", "nfa-pikevm"]
30
31nfa = ["nfa-thompson", "nfa-pikevm", "nfa-backtrack"]
32nfa-thompson = ["alloc"]
33nfa-pikevm = ["nfa-thompson"]
34nfa-backtrack = ["nfa-thompson"]
35
36dfa = ["dfa-build", "dfa-search", "dfa-onepass"]
37dfa-build = ["nfa-thompson", "dfa-search"]
38dfa-search = []
39dfa-onepass = ["nfa-thompson"]
40
41hybrid = ["alloc", "nfa-thompson"]
42
43perf = ["perf-inline", "perf-literal"]
44perf-inline = []
45perf-literal = ["perf-literal-substring", "perf-literal-multisubstring"]
46perf-literal-substring = ["aho-corasick?/perf-literal", "dep:memchr"]
47perf-literal-multisubstring = ["std", "dep:aho-corasick"]
48
49# Enables all Unicode features. This expands if new Unicode features are added.
50unicode = [
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}`.
62unicode-age = ["regex-syntax?/unicode-age"]
63# Enables use of a smattering of boolean properties, e.g., `\p{Emoji}`.
64unicode-bool = ["regex-syntax?/unicode-bool"]
65# Enables Unicode-aware case insensitive matching, e.g., `(?i)β`.
66unicode-case = ["regex-syntax?/unicode-case"]
67# Enables Unicode general categories, e.g., `\p{Letter}` or `\pL`.
68unicode-gencat = ["regex-syntax?/unicode-gencat"]
69# Enables Unicode-aware Perl classes corresponding to `\w`, `\s` and `\d`.
70unicode-perl = ["regex-syntax?/unicode-perl"]
71# Enables Unicode scripts and script extensions, e.g., `\p{Greek}`.
72unicode-script = ["regex-syntax?/unicode-script"]
73# Enables Unicode segmentation properties, e.g., `\p{gcb=Extend}`.
74unicode-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.
78unicode-word-boundary = []
79
80# These are strictly internal features that may be removed or changed in
81# non-compatible ways.
82internal-instrument = ["internal-instrument-pikevm"]
83internal-instrument-pikevm = ["logging", "std"]
84
85[dependencies]
86aho-corasick = { version = "1.0.0", optional = true, default-features = false }
87log = { version = "0.4.14", optional = true }
88memchr = { version = "2.6.0", optional = true, default-features = false }
89regex-syntax = { path = "../regex-syntax", version = "0.8.2", optional = true, default-features = false }
90
91[dev-dependencies]
92anyhow = "1.0.69"
93bstr = { version = "1.3.0", default-features = false, features = ["std"] }
94doc-comment = "0.3.3"
95quickcheck = { version = "1.0.3", default-features = false }
96regex-test = { path = "../regex-test", version = "0.1.0" }
97
98[dev-dependencies.env_logger]
99version = "0.9.3"
100default-features = false
101features = ["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]]
109path = "tests/lib.rs"
110name = "integration"
111