[go: up one dir, main page]

twoway 0.2.2

(Deprecated - use crate memchr instead.) Fast substring search for strings and byte strings. Optional SSE4.2 acceleration (if detected at runtime) using pcmpestri. Memchr is the only mandatory dependency. The two way algorithm is also used by rust's libstd itself, but here it is exposed both for byte strings, using memchr, and optionally using a SSE4.2 accelerated version.
Documentation
language: rust
sudo: false

matrix:
  include:
    - rust: 1.27.0
      env:
        TARGET=x86_64-unknown-linux-gnu
    - rust: stable
      env:
        TARGET=x86_64-unknown-linux-gnu
    - rust: stable
      env:
        TARGET=i686-unknown-linux-gnu
    - rust: beta
      env:
        TARGET=x86_64-unknown-linux-gnu
    - rust: nightly
      env:
        TARGET=x86_64-unknown-linux-gnu
        FEATURES='all benchmarks'
        BENCH=1
    - rust: nightly
      env:
        TARGET=x86_64-unknown-linux-gnu
        FEATURES='pattern'
    - rust: nightly
      env:
        TARGET=x86_64-unknown-linux-gnu
        FEATURES='pattern'
        TWOWAY_TEST_DISABLE_PCMP=1
    - rust: nightly
      env:
        TARGET=i686-unknown-linux-gnu
        FEATURES='pattern'
    - rust: nightly
      env:
        TARGET=aarch64-unknown-linux-gnu
        BUILD_ONLY=1
env:
  global:
    - HOST=x86_64-unknown-linux-gnu

addons:
  apt:
    packages:
      # needed for i686-unknown-linux-gnu target
      - gcc-multilib
install:
  # "rustup error: cannot re-add" without this conditional check
- if [[ $HOST != $TARGET ]]; then rustup target add $TARGET; fi

branches:
  only:
    - master
script:
  - |
      cargo build --verbose --no-default-features --features "$FEATURES" &&
      cargo build --verbose --features "$FEATURES" &&
      ([ -n "$BUILD_ONLY" ] || (
              cargo test --verbose --lib &&
              ([ -z "$FEATURES" ] || cargo test --verbose --features "$FEATURES" ) &&
              ([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES") &&
              cargo doc --verbose --features "$FEATURES"
      ))