Cargo Features
lazy-regex has no features set by default.
[dependencies]
lazy-regex = { version = "3.3.0", features = ["std", "lite", "perf", "perf-cache", "perf-dfa", "perf-inline", "perf-literal", "unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment"] }
- default
-
These default features are set whenever
lazy-regex
is added without
somewhere in the dependency tree.default-features = false Enables regex
- std
-
regex:
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. - lite = regex-lite
- perf
-
regex:
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
-
Enables perf-cache of regex
regex:
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. - perf-dfa
-
regex:
Enables use of a lazy DFA when possible.
- perf-inline
-
Enables perf-inline of regex
regex:
Enables aggressive use of inlining.
- perf-literal
-
Enables perf-literal of regex
regex:
Enables literal optimizations.
- unicode
-
regex:
UNICODE DATA FEATURES
Enables all Unicode features. This expands if new Unicode features are added. - unicode-age
-
Enables unicode-age of regex
regex:
Enables use of the
Age
property, e.g.,\p{Age:3.0}
. - unicode-bool
-
Enables unicode-bool of regex
regex:
Enables use of a smattering of boolean properties, e.g.,
\p{Emoji}
. - unicode-case
-
Enables unicode-case of regex
regex:
Enables Unicode-aware case insensitive matching, e.g.,
(?i)β
. - unicode-gencat
-
Enables unicode-gencat of regex
regex:
Enables Unicode general categories, e.g.,
\p{Letter}
or\pL
. - unicode-perl
-
Enables unicode-perl of regex
regex:
Enables Unicode-aware Perl classes corresponding to
\w
,\s
and\d
. - unicode-script
-
Enables unicode-script of regex
regex:
Enables Unicode scripts and script extensions, e.g.,
\p{Greek}
. - unicode-segment
-
Enables unicode-segment of regex
regex:
Enables Unicode segmentation properties, e.g.,
\p{gcb=Extend}
.
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.