Debian Codegraph @

debian/missing-sources/regex-automata/Cargo.toml.orig

raw
1 [package]
2 name = "regex-automata"
3 version = "0.4.13" #: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 homepage = "https://github.com/rust-lang/regex/tree/master/regex-automata"
8 repository = "https://github.com/rust-lang/regex"
9 readme = "README.md"
10 keywords = ["regex", "dfa", "automata", "automaton", "nfa"]
11 license = "MIT OR Apache-2.0"
12 categories = ["text-processing"]
13 edition = "2021"
14 autoexamples = false
15 rust-version = "1.65"
16
17 [lib]
18 bench = false
19
20 # This crate has many many many features. See the crate docs for a description
21 # of each and when you might want to use them.
22 [features]
23 default = ["std", "syntax", "perf", "unicode", "meta", "nfa", "dfa", "hybrid"]
24 std = ["regex-syntax?/std", "memchr?/std", "aho-corasick?/std", "alloc"]
25 alloc = []
26 logging = ["dep:log", "aho-corasick?/logging", "memchr?/logging"]
27
28 syntax = ["dep:regex-syntax", "alloc"]
29
30 meta = ["syntax", "nfa-pikevm"]
31
32 nfa = ["nfa-thompson", "nfa-pikevm", "nfa-backtrack"]
33 nfa-thompson = ["alloc"]
34 nfa-pikevm = ["nfa-thompson"]
35 nfa-backtrack = ["nfa-thompson"]
36
37 dfa = ["dfa-build", "dfa-search", "dfa-onepass"]
38 dfa-build = ["nfa-thompson", "dfa-search"]
39 dfa-search = []
40 dfa-onepass = ["nfa-thompson"]
41
42 hybrid = ["alloc", "nfa-thompson"]
43
44 perf = ["perf-inline", "perf-literal"]
45 perf-inline = []
46 perf-literal = ["perf-literal-substring", "perf-literal-multisubstring"]
47 perf-literal-substring = ["aho-corasick?/perf-literal", "dep:memchr"]
48 perf-literal-multisubstring = ["dep:aho-corasick"]
49
50 # Enables all Unicode features. This expands if new Unicode features are added.
51 unicode = [
52 "unicode-age",
53 "unicode-bool",
54 "unicode-case",
55 "unicode-gencat",
56 "unicode-perl",
57 "unicode-script",
58 "unicode-segment",
59 "unicode-word-boundary",
60 "regex-syntax?/unicode",
61 ]
62 # Enables use of the `Age` property, e.g., `\p{Age:3.0}`.
63 unicode-age = ["regex-syntax?/unicode-age"]
64 # Enables use of a smattering of boolean properties, e.g., `\p{Emoji}`.
65 unicode-bool = ["regex-syntax?/unicode-bool"]
66 # Enables Unicode-aware case insensitive matching, e.g., `(?i)β`.
67 unicode-case = ["regex-syntax?/unicode-case"]
68 # Enables Unicode general categories, e.g., `\p{Letter}` or `\pL`.
69 unicode-gencat = ["regex-syntax?/unicode-gencat"]
70 # Enables Unicode-aware Perl classes corresponding to `\w`, `\s` and `\d`.
71 unicode-perl = ["regex-syntax?/unicode-perl"]
72 # Enables Unicode scripts and script extensions, e.g., `\p{Greek}`.
73 unicode-script = ["regex-syntax?/unicode-script"]
74 # Enables Unicode segmentation properties, e.g., `\p{gcb=Extend}`.
75 unicode-segment = ["regex-syntax?/unicode-segment"]
76 # Enables Unicode word boundary support. If this is enabled with unicode-perl,
77 # then data tables from regex-syntax are used. Otherwise, a new data table
78 # inside regex-automata will be included.
79 unicode-word-boundary = []
80
81 # These are strictly internal features that may be removed or changed in
82 # non-compatible ways.
83 internal-instrument = ["internal-instrument-pikevm"]
84 internal-instrument-pikevm = ["logging", "std"]
85
86 [dependencies]
87 aho-corasick = { version = "1.0.0", optional = true, default-features = false }
88 log = { version = "0.4.14", optional = true }
89 memchr = { version = "2.6.0", optional = true, default-features = false }
90 regex-syntax = { path = "../regex-syntax", version = "0.8.5", optional = true, default-features = false }
91
92 [dev-dependencies]
93 anyhow = "1.0.69"
94 bstr = { version = "1.3.0", default-features = false, features = ["std"] }
95 doc-comment = "0.3.3"
96 quickcheck = { version = "1.0.3", default-features = false }
97 regex-test = { path = "../regex-test", version = "0.1.0" }
98
99 [dev-dependencies.env_logger]
100 version = "0.9.3"
101 default-features = false
102 features = ["atty", "humantime", "termcolor"]
103
104 # We put these tests here because they are written primarily against the
105 # regex-automata API, and in particular use regex-automata features for
106 # conditional compilation. If we moved these up as tests on 'regex' proper,
107 # then we'd need to duplicate regex-automata's complex features on 'regex' too,
108 # which I really do not want to do.
109 [[test]]
110 path = "tests/lib.rs"
111 name = "integration"
112
113 [package.metadata.docs.rs]
114 # We want to document all features.
115 all-features = true
116 # Since this crate's feature setup is pretty complicated, it is worth opting
117 # into a nightly unstable option to show the features that need to be enabled
118 # for public API items. To do that, we set 'docsrs_regex', and when that's
119 # enabled, we enable the 'doc_cfg' feature.
120 #
121 # To test this locally, run:
122 #
123 # RUSTDOCFLAGS="--cfg docsrs_regex" cargo +nightly doc --all-features
124 #
125 # Note that we use `docsrs_regex` instead of the more standard `docsrs` because
126 # other crates use that same `cfg` knob. And since we are enabling a nightly
127 # feature, they sometimes break. By using our "own" `cfg` knob, we are closer
128 # to being masters of our own destiny.
129 rustdoc-args = ["--cfg", "docsrs_regex"]
130
131 # This squashes the (AFAIK) erroneous warning that `docsrs_regex` is not a
132 # valid `cfg` knob.
133 [lints.rust]
134 unexpected_cfgs = { level = "allow", check-cfg = ['cfg(docsrs_regex)'] }