-
Notifications
You must be signed in to change notification settings - Fork 96
/
Cargo.toml
74 lines (64 loc) · 2.6 KB
/
Cargo.toml
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
[package]
name = "aho-corasick"
version = "1.1.3" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = "Fast multiple substring searching."
homepage = "https://github.com/BurntSushi/aho-corasick"
repository = "https://github.com/BurntSushi/aho-corasick"
readme = "README.md"
keywords = ["string", "search", "text", "pattern", "multi"]
license = "Unlicense OR MIT"
categories = ["text-processing"]
autotests = false
exclude = ["/aho-corasick-debug", "/benchmarks", "/tmp"]
edition = "2021"
rust-version = "1.60.0"
[lib]
name = "aho_corasick"
[features]
default = ["std", "perf-literal"]
std = ["memchr?/std"]
# Enables prefilter optimizations that depend on external crates.
perf-literal = ["dep:memchr"]
# Enable logging via the 'log' crate. This is useful for seeing messages about
# internal decisions and metrics. For example, how the choice of the internal
# Aho-Corasick implementation is used or the heap usage of an automaton.
logging = ["dep:log"]
# Provides a trait impl for fst::Automaton for nfa::noncontiguous::NFA,
# nfa::contiguous::NFA and dfa::DFA. This is useful for searching an
# FST with an Aho-Corasick automaton. Note that this does not apply
# to the top-level 'AhoCorasick' type, as it does not implement the
# aho_corasick::automaton::Automaton trait, and thus enabling this feature does
# not cause it to implement fst::Automaton either.
#
# NOTE: Currently this feature is not available as `fst` is not at 1.0 yet,
# and this would make `fst` a public dependency. If you absolutely need this,
# you can copy the (very small) src/transducer.rs file to your tree. It
# specifically does not use any private APIs and should work after replacing
# 'crate::' with 'aho_corasick::'.
#
# NOTE: I think my current plan is to flip this around an add an optional
# dependency on 'aho-corasick' to the 'fst' crate and move the trait impls
# there. But I haven't gotten around to it yet.
# transducer = ["fst"]
[dependencies]
log = { version = "0.4.17", optional = true }
memchr = { version = "2.4.0", default-features = false, optional = true }
[dev-dependencies]
doc-comment = "0.3.3"
# fst = "0.4.5"
[package.metadata.docs.rs]
# We want to document all features.
all-features = true
# This opts 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
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
[profile.release]
debug = true
[profile.bench]
debug = true