# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.75"
name = "ib-matcher"
version = "0.4.1"
authors = ["Chaoses-Ib"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A multilingual, flexible and fast string, glob and regex matcher. Support 拼音匹配 (Chinese pinyin match) and ローマ字検索 (Japanese romaji match)."
homepage = "https://github.com/Chaoses-Ib/ib-matcher"
readme = "README.md"
keywords = [
    "unicode",
    "cjk",
    "romaji",
    "glob",
    "regex",
]
license = "MIT"
repository = "https://github.com/Chaoses-Ib/ib-matcher"
resolver = "3"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
alloc = ["regex-automata?/alloc"]
default = [
    "std",
    "unicode",
    "perf",
    "romaji-compress-words",
]
doc = ["dep:document-features"]
encoding = ["dep:widestring"]
inmut-data = []
minimal = [
    "inmut-data",
    "pinyin",
]
perf = [
    "perf-inline",
    "perf-literal",
    "perf-unicode",
]
perf-inline = ["regex-automata?/perf-inline"]
perf-literal = ["perf-literal-substring"]
perf-literal-substring = ["ib-unicode/perf-ascii"]
perf-plain-ac = []
perf-plain-regex = ["dep:regex"]
perf-unicode = [
    "ib-unicode/perf-ascii",
    "ib-unicode/perf-case-fold",
]
pinyin = [
    "dep:arraystring",
    "dep:bitflags",
]
regex = [
    "regex-cp",
    "regex-lita",
    "syntax-regex",
]
regex-automata = ["dep:regex-automata"]
regex-callback = ["regex-cp"]
regex-cp = [
    "regex-nfa",
    "syntax-regex",
]
regex-lita = [
    "regex-cp",
    "regex-automata/dfa-build",
    "regex-automata/dfa-search",
]
regex-nfa = [
    "regex-automata",
    "regex-automata/nfa-thompson",
    "alloc",
]
regex-unicode = [
    "regex-automata?/unicode",
    "regex-syntax?/unicode",
]
romaji = ["dep:ib-romaji"]
romaji-cache = ["ib-romaji?/cache"]
romaji-compress-words = ["ib-romaji?/compress-words"]
std = [
    "regex-automata?/std",
    "regex-syntax?/std",
    "logos?/std",
    "alloc",
    "ib-romaji?/std",
]
syntax = [
    "syntax-glob",
    "syntax-ev",
]
syntax-ev = []
syntax-glob = [
    "dep:logos",
    "syntax-regex",
]
syntax-regex = [
    "dep:regex-syntax",
    "regex-automata?/syntax",
    "alloc",
]
unicode = [
    "ib-unicode/case-fold",
    "regex-unicode",
]

[lib]
name = "ib_matcher"
path = "src/lib.rs"

[[example]]
name = "basic"
path = "examples/basic.rs"

[[bench]]
name = "analyze"
path = "benches/analyze.rs"
harness = false

[[bench]]
name = "ascii"
path = "benches/ascii.rs"
harness = false

[[bench]]
name = "matcher"
path = "benches/matcher.rs"
harness = false

[[bench]]
name = "regex_ascii"
path = "benches/regex/ascii.rs"
harness = false

[[bench]]
name = "regex_cp"
path = "benches/regex/cp.rs"
harness = false

[[bench]]
name = "regex_lita"
path = "benches/regex/lita.rs"
harness = false

[dependencies.aho-corasick]
version = "1"

[dependencies.arraystring]
version = "0.3"
optional = true

[dependencies.bitflags]
version = "2"
optional = true

[dependencies.bon]
version = "3"

[dependencies.document-features]
version = "0.2"
optional = true

[dependencies.ib-romaji]
version = "0.1.3"
optional = true
default-features = false

[dependencies.ib-unicode]
version = "0.2"
default-features = false

[dependencies.itertools]
version = "0.14"

[dependencies.logos]
version = "0.15"
features = ["export_derive"]
optional = true
default-features = false

[dependencies.regex]
version = "1.10.2"
features = [
    "std",
    "perf",
]
optional = true
default-features = false

[dependencies.regex-automata]
version = "0.4"
optional = true
default-features = false

[dependencies.regex-syntax]
version = "0.8"
optional = true
default-features = false

[dependencies.widestring]
version = "1.0.2"
optional = true

[dev-dependencies.criterion]
version = "0.6"

[dev-dependencies.daachorse]
version = "1"

[dev-dependencies.regex-automata]
version = "0.4"
features = [
    "nfa-backtrack",
    "perf-literal-multisubstring",
    "dfa",
    "hybrid",
    "perf-literal",
]
default-features = false
