[package] name = "regex-automata" version = "0.2.0" #:version authors = ["Andrew Gallant "] description = "Automata construction and matching using regular expressions." documentation = "https://docs.rs/regex-automata" homepage = "https://github.com/BurntSushi/regex-automata" repository = "https://github.com/BurntSushi/regex-automata" readme = "README.md" keywords = ["regex", "dfa", "automata", "automaton", "nfa"] license = "Unlicense/MIT" categories = ["text-processing"] exclude = [ "/.github", "/scripts/*", "/regex-cli", "/regex-test", ] autotests = false autoexamples = false edition = "2018" resolver = "2" [workspace] members = ["bench", "examples", "regex-cli", "regex-test"] [lib] bench = false [features] # WARNING: The features below were assembled quickly without much thought. # They might not work as you expect. The safest configuration is the default # configuration. default = ["std", "alloc", "syntax"] std = [] alloc = ["syntax"] transducer = ["fst"] logging = ["log"] syntax = ["regex-syntax"] # WARNING: The features below are in a very rough draft form, which is why # they are all commented out. I'm still working through the crate feature # design, planned for the regex-automata 0.3 release. # TODO: These features need to be fleshed out more, actually implemented and # then tested. Also, add 'alloc' and 'std' features to regex-syntax before # doing so. #default = ["std", "dfa", "syntax", "unicode", "regex-syntax/default"] #std = ["alloc", "memchr/std"] # TODO: Should this also imply regex-syntax/alloc? Will that turn into a no-op # if regex-syntax isn't enabled as a dependency? Do we need a separate # 'alloc_nosyntax' feature to enable alloc features without bringing in # regex-syntax? Sigh. #alloc = [] #logging = ["log"] #transducer = ["fst"] # When enabled, the 'dfa' sub-module will be available. Note that if 'dfa' is # enabled but 'alloc' is not, then only DFA deserialization and search will be # available. DFA construction requires the 'alloc' and 'syntax' features to be # enabled. #dfa = [] #syntax = ["regex-syntax"] ## Enables all Unicode features. This expands if new Unicode features are added. #unicode = [ # "unicode-age", # "unicode-bool", # "unicode-case", # "unicode-gencat", # "unicode-perl", # "unicode-script", # "unicode-segment", # "regex-syntax/unicode", #] ## Enables use of the `Age` property, e.g., `\p{Age:3.0}`. #unicode-age = ["regex-syntax/unicode-age"] ## Enables use of a smattering of boolean properties, e.g., `\p{Emoji}`. #unicode-bool = ["regex-syntax/unicode-bool"] ## Enables Unicode-aware case insensitive matching, e.g., `(?i)β`. #unicode-case = ["regex-syntax/unicode-case"] ## Enables Unicode general categories, e.g., `\p{Letter}` or `\pL`. #unicode-gencat = ["regex-syntax/unicode-gencat"] ## Enables Unicode-aware Perl classes corresponding to `\w`, `\s` and `\d`. #unicode-perl = ["regex-syntax/unicode-perl"] ## Enables Unicode scripts and script extensions, e.g., `\p{Greek}`. #unicode-script = ["regex-syntax/unicode-script"] ## Enables Unicode segmentation properties, e.g., `\p{gcb=Extend}`. #unicode-segment = ["regex-syntax/unicode-segment"] [dependencies] fst = { version = "0.4.5", optional = true } log = { version = "0.4.14", optional = true } memchr = { version = "2.4.0", default-features = false } regex-syntax = { version = "0.6.24", optional = true } # [dev-dependencies] # bstr = { version = "0.2.16", default-features = false, features = ["std"] } # quickcheck = { version = "1.0.3", default-features = false } # regex-syntax = "0.6.16" # regex-test = { version = "*", path = "regex-test" } [[test]] path = "tests/tests.rs" name = "integration" [profile.dev] # Running tests takes too long in debug mode, so we forcefully always build # with optimizations. Unfortunate, but, ¯\_(ツ)_/¯. # # It's counter-intuitive that this needs to be set on dev *and* test, but # it's because the tests that take a long time to run are run as integration # tests in a separate crate. The test.opt-level setting won't apply there, so # we need to set the opt-level across the entire build. opt-level = 3 debug = true [profile.test] opt-level = 3 debug = true [profile.release] debug = true [profile.bench] debug = true