1 | [package] |
2 | name = "aho-corasick" |
3 | version = "1.1.3" #:version |
4 | authors = ["Andrew Gallant <jamslam@gmail.com>" ] |
5 | description = "Fast multiple substring searching." |
6 | homepage = "https://github.com/BurntSushi/aho-corasick" |
7 | repository = "https://github.com/BurntSushi/aho-corasick" |
8 | readme = "README.md" |
9 | keywords = ["string" , "search" , "text" , "pattern" , "multi" ] |
10 | license = "Unlicense OR MIT" |
11 | categories = ["text-processing" ] |
12 | autotests = false |
13 | exclude = ["/aho-corasick-debug" , "/benchmarks" , "/tmp" ] |
14 | edition = "2021" |
15 | rust-version = "1.60.0" |
16 | |
17 | [lib] |
18 | name = "aho_corasick" |
19 | |
20 | [features] |
21 | default = ["std" , "perf-literal" ] |
22 | std = ["memchr?/std" ] |
23 | |
24 | # Enables prefilter optimizations that depend on external crates. |
25 | perf-literal = ["dep:memchr" ] |
26 | |
27 | # Enable logging via the 'log' crate. This is useful for seeing messages about |
28 | # internal decisions and metrics. For example, how the choice of the internal |
29 | # Aho-Corasick implementation is used or the heap usage of an automaton. |
30 | logging = ["dep:log" ] |
31 | |
32 | # Provides a trait impl for fst::Automaton for nfa::noncontiguous::NFA, |
33 | # nfa::contiguous::NFA and dfa::DFA. This is useful for searching an |
34 | # FST with an Aho-Corasick automaton. Note that this does not apply |
35 | # to the top-level 'AhoCorasick' type, as it does not implement the |
36 | # aho_corasick::automaton::Automaton trait, and thus enabling this feature does |
37 | # not cause it to implement fst::Automaton either. |
38 | # |
39 | # NOTE: Currently this feature is not available as `fst` is not at 1.0 yet, |
40 | # and this would make `fst` a public dependency. If you absolutely need this, |
41 | # you can copy the (very small) src/transducer.rs file to your tree. It |
42 | # specifically does not use any private APIs and should work after replacing |
43 | # 'crate::' with 'aho_corasick::'. |
44 | # |
45 | # NOTE: I think my current plan is to flip this around an add an optional |
46 | # dependency on 'aho-corasick' to the 'fst' crate and move the trait impls |
47 | # there. But I haven't gotten around to it yet. |
48 | # transducer = ["fst"] |
49 | |
50 | [dependencies] |
51 | log = { version = "0.4.17" , optional = true } |
52 | memchr = { version = "2.4.0" , default-features = false, optional = true } |
53 | |
54 | [dev-dependencies] |
55 | doc-comment = "0.3.3" |
56 | # fst = "0.4.5" |
57 | |
58 | [package.metadata.docs.rs] |
59 | # We want to document all features. |
60 | all-features = true |
61 | # This opts into a nightly unstable option to show the features that need to be |
62 | # enabled for public API items. To do that, we set 'docsrs', and when that's |
63 | # enabled, we enable the 'doc_auto_cfg' feature. |
64 | # |
65 | # To test this locally, run: |
66 | # |
67 | # RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features |
68 | rustdoc-args = ["--cfg" , "docsrs" , "--generate-link-to-definition" ] |
69 | |
70 | [profile.release] |
71 | debug = true |
72 | |
73 | [profile.bench] |
74 | debug = true |
75 | |