Skip to content

Commit

Permalink
Merge pull request #16 from frewsxcv/vagrantfile
Browse files Browse the repository at this point in the history
Add Vagrantfile for easier usage
  • Loading branch information
frewsxcv committed Oct 26, 2015
2 parents 71a3646 + a04b9aa commit 605e399
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions etc/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/vivid64"

config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 8
end

config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y git clang cmake libssl-dev
cd /opt
# Build rust
git clone https://github.com/rust-lang/rust.git
cd rust
git checkout 717e8831b # https://github.com/frewsxcv/afl.rs/issues/11
./configure --enable-clang --disable-libcpp --enable-optimize --disable-docs
make -j 8
cd ..
echo "export PATH=\$PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/bin" >> /home/vagrant/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rust/x86_64-unknown-linux-gnu/stage2/lib/" >> /home/vagrant/.bashrc
source /home/vagrant/.bashrc
# Build cargo
git clone https://github.com/rust-lang/cargo
cd cargo
apt-get install -y pkg-config # https://github.com/frewsxcv/afl.rs/issues/11
git checkout 1ae683a1496be2e35f213e3e11645adcb3ed62b1 # https://github.com/frewsxcv/afl.rs/issues/11
./configure --local-rust-root=../rust/x86_64-unknown-linux-gnu/stage2/ --enable-optimize
make
echo "export PATH=\$PATH:/opt/cargo/target/x86_64-unknown-linux-gnu/release" >> /home/vagrant/.bashrc
source /home/vagrant/.bashrc
# Build afl
wget http://lcamtuf.coredump.cx/afl/releases/afl-1.94b.tgz
tar xf afl-1.94b.tgz
cd afl-1.94b
make
make install
# export CXX="$(which clang++) -Wno-c++11-extensions"
# export LLVM_CONFIG=$(which llvm-config-3.4)
# build repo with rust plugin
SHELL
end

0 comments on commit 605e399

Please sign in to comment.