regex 0.1.64

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Documentation
#!/bin/bash

usage() {
  echo "Usage: $(basename $0) [rust | rust-bytes | rust-plugin | pcre | onig]" >&2
  exit 1
}

if [ $# = 0 ] || [ $1 = '-h' ] || [ $1 = '--help' ]; then
  usage
fi

which="$1"
shift
case $which in
  rust)
    exec cargo bench \
      --manifest-path benches/Cargo.toml \
      --bench rust \
      --features re-rust \
      "$@"
    ;;
  rust-bytes)
    exec cargo bench \
      --manifest-path benches/Cargo.toml \
      --bench rust-bytes \
      --features re-rust-bytes \
      "$@"
    ;;
  rust-plugin)
    exec cargo bench \
      --manifest-path benches/Cargo.toml \
      --bench rust-plugin \
      --features re-rust-plugin \
      "$@"
    ;;
  pcre)
    exec cargo bench \
      --manifest-path benches/Cargo.toml \
      --bench pcre \
      --features re-pcre \
      "$@"
    ;;
  onig|oniguruma)
    exec cargo bench \
      --manifest-path benches/Cargo.toml \
      --bench onig \
      --features re-onig \
      "$@"
    ;;
  *)
    usage
    ;;
esac