Cargo Features

[dependencies]
matcher_rs = { version = "0.5.6", default-features = false, features = ["runtime_build", "serde", "dfa"] }
default = dfa

The dfa feature is set by default whenever matcher_rs is added without default-features = false somewhere in the dependency tree.

runtime_build

By enable runtime_build feature, we could build process matcher at runtime, but with build time increasing.

Affects constants::FANJIAN, constants::TEXT_DELETE, constants::NUM_NORM, constants::NORM, constants::PINYIN, constants::WHITE_SPACE

serde

By enable serde feature, we could serialize and deserialize matcher and simple_matcher.
With serde feature, AhoCorasick's prefilter is disabled, because I don't know how to serialize it correctly,
which will lead to performance regression when the patterns size is small (say, less than 100).

Enables serde of aho-corasick-unsafe

Affects serde::serde_regex, serde::serde_regex_list, serde::serde_regex_set

dfa default

By enable dfa feature, we could use dfa to perform simple matching, but with significantly increasing memory consumption.

Affects constants::NORMALIZE_PROCESS_LIST_STR, constants::TEXT_DELETE, constants::WHITE_SPACE