1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
[]
= "regex"
= "1.11.1" #:version
= ["The Rust Project Developers", "Andrew Gallant <jamslam@gmail.com>"]
= "MIT OR Apache-2.0"
= "README.md"
= "https://github.com/rust-lang/regex"
= "https://docs.rs/regex"
= "https://github.com/rust-lang/regex"
= """
An implementation of regular expressions for Rust. This implementation uses
finite automata and guarantees linear time matching on all inputs.
"""
= ["text-processing"]
= false
= ["/scripts/*", "/.github/*"]
= "2021"
= "1.65"
[]
= [
"regex-automata",
"regex-capi",
"regex-cli",
"regex-lite",
"regex-syntax",
"regex-test",
]
# Features are documented in the "Crate features" section of the crate docs:
# https://docs.rs/regex/*/#crate-features
[]
= ["std", "perf", "unicode", "regex-syntax/default"]
# ECOSYSTEM FEATURES
# The 'std' feature permits the regex crate to use the standard library. This
# is intended to support future use cases where the regex crate may be able
# to compile without std, and instead just rely on 'core' and 'alloc' (for
# example). Currently, this isn't supported, and removing the 'std' feature
# will prevent regex from compiling.
= [
"aho-corasick?/std",
"memchr?/std",
"regex-automata/std",
"regex-syntax/std",
]
# This feature enables the 'log' crate to emit messages. This is usually
# only useful for folks working on the regex crate itself, but can be useful
# if you're trying hard to do some performance hacking on regex patterns
# themselves. Note that you'll need to pair this with a crate like 'env_logger'
# to actually emit the log messages somewhere.
= [
"aho-corasick?/logging",
"memchr?/logging",
"regex-automata/logging",
]
# The 'use_std' feature is DEPRECATED. It will be removed in regex 2. Until
# then, it is an alias for the 'std' feature.
= ["std"]
# PERFORMANCE FEATURES
# Enables all default performance features. Note that this specifically does
# not include perf-dfa-full, because it leads to higher compile times and
# bigger binaries, and the runtime performance improvement is not obviously
# worth it.
= [
"perf-cache",
"perf-dfa",
"perf-onepass",
"perf-backtrack",
"perf-inline",
"perf-literal",
]
# Enables use of a lazy DFA when possible.
= ["regex-automata/hybrid"]
# Enables use of a fully compiled DFA when possible.
= ["regex-automata/dfa-build", "regex-automata/dfa-search"]
# Enables use of the one-pass regex matcher, which speeds up capture searches
# even beyond the backtracker.
= ["regex-automata/dfa-onepass"]
# Enables use of a bounded backtracker, which speeds up capture searches.
= ["regex-automata/nfa-backtrack"]
# Enables aggressive use of inlining.
= ["regex-automata/perf-inline"]
# Enables literal optimizations.
= [
"dep:aho-corasick",
"dep:memchr",
"regex-automata/perf-literal",
]
# Enables fast caching. (If disabled, caching is still used, but is slower.)
# Currently, this feature has no effect. It used to remove the thread_local
# dependency and use a slower internal cache, but now the default cache has
# been improved and thread_local is no longer a dependency at all.
= []
# UNICODE DATA FEATURES
# Enables all Unicode features. This expands if new Unicode features are added.
= [
"unicode-age",
"unicode-bool",
"unicode-case",
"unicode-gencat",
"unicode-perl",
"unicode-script",
"unicode-segment",
"regex-automata/unicode",
"regex-syntax/unicode",
]
# Enables use of the `Age` property, e.g., `\p{Age:3.0}`.
= [
"regex-automata/unicode-age",
"regex-syntax/unicode-age",
]
# Enables use of a smattering of boolean properties, e.g., `\p{Emoji}`.
= [
"regex-automata/unicode-bool",
"regex-syntax/unicode-bool",
]
# Enables Unicode-aware case insensitive matching, e.g., `(?i)β`.
= [
"regex-automata/unicode-case",
"regex-syntax/unicode-case",
]
# Enables Unicode general categories, e.g., `\p{Letter}` or `\pL`.
= [
"regex-automata/unicode-gencat",
"regex-syntax/unicode-gencat",
]
# Enables Unicode-aware Perl classes corresponding to `\w`, `\s` and `\d`.
= [
"regex-automata/unicode-perl",
"regex-automata/unicode-word-boundary",
"regex-syntax/unicode-perl",
]
# Enables Unicode scripts and script extensions, e.g., `\p{Greek}`.
= [
"regex-automata/unicode-script",
"regex-syntax/unicode-script",
]
# Enables Unicode segmentation properties, e.g., `\p{gcb=Extend}`.
= [
"regex-automata/unicode-segment",
"regex-syntax/unicode-segment",
]
# UNSTABLE FEATURES (requires Rust nightly)
# A blanket feature that governs whether unstable features are enabled or not.
# Unstable features are disabled by default, and typically rely on unstable
# features in rustc itself.
= ["pattern"]
# Enable to use the unstable pattern traits defined in std. This is enabled
# by default if the unstable feature is enabled.
= []
# For very fast multi-prefix literal matching.
[]
= "1.0.0"
= true
= false
# For skipping along search text quickly when a leading byte is known.
[]
= "2.6.0"
= true
= false
# For the actual regex engines.
[]
= "regex-automata"
= "0.4.8"
= false
= ["alloc", "syntax", "meta", "nfa-pikevm"]
# For parsing regular expressions.
[]
= "regex-syntax"
= "0.8.5"
= false
[]
# For examples.
= "1.17.1"
# For property based tests.
= { = "1.0.3", = false }
# To check README's example
= "0.3"
# For easy error handling in integration tests.
= "1.0.69"
# A library for testing regex engines.
= { = "regex-test", = "0.1.0" }
[]
# Note that this is currently using an older version because of the dependency
# tree explosion that happened in 0.10.
= "0.9.3"
= false
= ["atty", "humantime", "termcolor"]
# This test suite reads a whole boatload of tests from the top-level testdata
# directory, and then runs them against the regex crate API.
#
# regex-automata has its own version of them, and runs them against each
# internal regex engine individually.
#
# This means that if you're seeing a failure in this test suite, you should
# try running regex-automata's tests:
#
# cargo test --manifest-path regex-automata/Cargo.toml --test integration
#
# That *might* give you a more targeted test failure. i.e., "only the
# PikeVM fails this test." Which gives you a narrower place to search. If
# regex-automata's test suite passes, then the bug might be in the integration
# of the regex crate and regex-automata. But generally speaking, a failure
# in this test suite *should* mean there is a corresponding failure in
# regex-automata's test suite.
[[]]
= "tests/lib.rs"
= "integration"
[]
# We want to document all features.
= true
# Since this crate's feature setup is pretty complicated, it is worth opting
# into a nightly unstable option to show the features that need to be enabled
# for public API items. To do that, we set 'docsrs', and when that's enabled,
# we enable the 'doc_auto_cfg' feature.
#
# To test this locally, run:
#
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
= ["--cfg", "docsrs"]
[]
= true
[]
= true
[]
# Running tests takes too long in debug mode, so we forcefully always build
# with optimizations. Unfortunate, but, ¯\_(ツ)_/¯.
#
# It's counter-intuitive that this needs to be set on dev *and* test, but
# it's because the tests that take a long time to run are run as integration
# tests in a separate crate. The test.opt-level setting won't apply there, so
# we need to set the opt-level across the entire build.
= 3
= true
[]
= 3
= true