1[package]
2name = "aho-corasick"
3version = "1.1.3" #:version
4authors = ["Andrew Gallant <jamslam@gmail.com>"]
5description = "Fast multiple substring searching."
6homepage = "https://github.com/BurntSushi/aho-corasick"
7repository = "https://github.com/BurntSushi/aho-corasick"
8readme = "README.md"
9keywords = ["string", "search", "text", "pattern", "multi"]
10license = "Unlicense OR MIT"
11categories = ["text-processing"]
12autotests = false
13exclude = ["/aho-corasick-debug", "/benchmarks", "/tmp"]
14edition = "2021"
15rust-version = "1.60.0"
16
17[lib]
18name = "aho_corasick"
19
20[features]
21default = ["std", "perf-literal"]
22std = ["memchr?/std"]
23
24# Enables prefilter optimizations that depend on external crates.
25perf-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.
30logging = ["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]
51log = { version = "0.4.17", optional = true }
52memchr = { version = "2.4.0", default-features = false, optional = true }
53
54[dev-dependencies]
55doc-comment = "0.3.3"
56# fst = "0.4.5"
57
58[package.metadata.docs.rs]
59# We want to document all features.
60all-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
68rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
69
70[profile.release]
71debug = true
72
73[profile.bench]
74debug = true
75