[package] publish = false name = "regex-benchmark" version = "0.1.0" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/regex" documentation = "https://docs.rs/regex" homepage = "https://github.com/rust-lang/regex" description = "Regex benchmarks for Rust's and other engines." build = "build.rs" workspace = ".." edition = "2018" [dependencies] docopt = "1" lazy_static = "1" libc = "0.2" onig = { version = "3", optional = true } libpcre-sys = { version = "0.2", optional = true } memmap = "0.6.2" regex = { version = "1", path = ".." } regex-syntax = { version = "0.6", path = "../regex-syntax" } serde = { version = "1", features = ["derive"] } cfg-if = "0.1" [build-dependencies] cc = "1" pkg-config = "0.3.9" [[bin]] name = "regex-run-one" path = "src/main.rs" bench = false # Use features to conditionally compile benchmarked regexes, since not every # regex works on every engine. Additionally, it is useful to be able to build # each benchmark individually, so that not all dependencies are required to # run only one benchmark. # # Note that when running benchmarks, only ONE feature should be set at a time. # Doing anything else will probably result in weird "duplicate definition" # compiler errors. # # Tip: use the `bench/run` script (in this directory) to run benchmarks. [features] re-pcre1 = ["libpcre-sys"] re-pcre2 = [] re-onig = ["onig"] re-re2 = [] re-rust = [] re-rust-bytes = [] re-tcl = [] [[bench]] name = "bench" path = "src/bench.rs" test = false bench = true