Compile ripgreg (rp) on Ubuntu 16.04 LTS

Just a quick note to myself on how to compile the insanely fast rg utility from git sources w/ AVX and SIMD activated.

  1. Clone from sources: git clone git@github.com:BurntSushi/ripgrep.git --depth 1 && cd ripgrep
  2. Install rustup to be able to compile against nightly Rust releases: curl https://sh.rustup.rs -sSf | sh
  3. Enable the nightly rust release for the ripgrep project: rustup override set nightly
  4. Compile: ./compile
  5. The new binary can be found run from ./target/release/rg

Shell installer are quite fishy, so this is not the preferred way of installation, there is also the possibility to directly install it via (packaged) cargo command (cargo install ripgrep) but that version is w/o AVX/SIMD as both can not compile (currently) with the stable Rust version.

Additionally there is a home-/ linux- brew based installer, but I have not tried it.

References:

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.