From ecdad016fc0a9310f74fef2e9ae85c2e203cc7bf Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 22 Jan 2019 20:52:10 -0800 Subject: [PATCH 1/5] Removed unnecesary dependencies --- .circleci/config.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 339d76dfd48..35a658daa69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,8 +13,8 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - sudo apt-get install texinfo - sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 + # sudo apt-get install texinfo + # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: name: Install lint deps command: | @@ -43,8 +43,8 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - sudo apt-get install texinfo - sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 + # sudo apt-get install texinfo + # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: make test - save_cache: paths: @@ -69,8 +69,9 @@ jobs: - run: name: Install crate dependencies command: | - brew install libtool || true - brew install autoconf cmake libffi || true + brew install cmake + # brew install libtool || true + # brew install autoconf cmake libffi || true - save_cache: paths: - /usr/local/Homebrew @@ -117,8 +118,8 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - sudo apt-get install texinfo - sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 + # sudo apt-get install texinfo + # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: name: Execute tests command: make test @@ -163,8 +164,9 @@ jobs: - run: name: Install crate dependencies command: | - brew install libtool || true - brew install autoconf cmake libffi || true + brew install cmake + # brew install libtool || true + # brew install autoconf cmake libffi || true - save_cache: paths: - /usr/local/Homebrew @@ -219,8 +221,8 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - sudo apt-get install texinfo - sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 + # sudo apt-get install texinfo + # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: rustup default nightly - run: make test - save_cache: From 65d136e91a752059aa99ddd9552bab90f3b04dd8 Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 22 Jan 2019 21:22:23 -0800 Subject: [PATCH 2/5] Updated Readme with dependencies installation instructions Fix #107 --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b612c9bb5f..0a1c3ae8a95 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,63 @@ Wasmer is structured into different directories: - [`src`](./src): code related to the wasmer excutable binary itself - [`lib`](./lib): modularized libraries that Wasmer uses under the hood +- [`examples`](./examples): some useful examples to getting started with wasmer -## Building & Running +## Dependencies -To build this project you will need Rust and Cargo. +Building wasmer requires [rustup](https://rustup.rs/). + +To install on Windows, download and run [`rustup-init.exe`](https://win.rustup.rs/) +then follow the onscreen instructions. + +To install on other systems, run: + +```sh +curl https://sh.rustup.rs -sSf | sh +``` + +### Other dependencies + +Please select your operating system: +* [macOS](#macos) +* [Debian-based Linuxes](#debian-based-linuxes) +* [Microsoft Windows](#windows-msvc) + +#### macOS + +If you have [homebrew](https://brew.sh/) installed: + +``` sh +brew install cmake +``` + +Or, in case you have [ports](https://www.macports.org/install.php): + +```sh +sudo port install cmake +``` + +#### Debian-based Linuxes + +``` sh +sudo apt install cmake +``` + +#### Windows (MSVC) + +Right now Windows support is *highly experimental*. +We are working on this so Wasmer can soon be released for Windows. + +1. Install Python for Windows (https://www.python.org/downloads/release/python-2714/). The Windows x86-64 MSI installer is fine. +You should change the installation to install the "Add python.exe to Path" feature. + +2. Install Git for Windows (https://git-scm.com/download/win). DO allow it to add git.exe to the PATH (default +settings for the installer are fine). + + +## Building + +Wasmer is built with [Cargo](https://crates.io/), the Rust package manager. ```sh # checkout code From 24bf1417c649531d49420121286e2e57830ae210 Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 22 Jan 2019 21:26:29 -0800 Subject: [PATCH 3/5] Try to skip brew updates --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 35a658daa69..ee88d5afc65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,9 +63,9 @@ jobs: keys: - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - v5-cargo-cache-darwin-{{ arch }}-brew - - run: - name: Update Brew - command: brew update || true + # - run: + # name: Update Brew + # command: brew update || true - run: name: Install crate dependencies command: | @@ -158,9 +158,9 @@ jobs: keys: - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - v5-cargo-cache-darwin-{{ arch }}-brew - - run: - name: Update Brew - command: brew update || true + # - run: + # name: Update Brew + # command: brew update || true - run: name: Install crate dependencies command: | From c3ee9a7ae5546f472f62ae77e135d62b4712d81f Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 22 Jan 2019 21:32:06 -0800 Subject: [PATCH 4/5] Trying to improve macOS build speed on CircleCI --- .circleci/config.yml | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee88d5afc65..94ee9beef65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,8 +13,6 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - # sudo apt-get install texinfo - # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: name: Install lint deps command: | @@ -43,8 +41,6 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - # sudo apt-get install texinfo - # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: make test - save_cache: paths: @@ -62,20 +58,13 @@ jobs: - restore_cache: keys: - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - - v5-cargo-cache-darwin-{{ arch }}-brew - # - run: - # name: Update Brew - # command: brew update || true - run: name: Install crate dependencies command: | - brew install cmake - # brew install libtool || true - # brew install autoconf cmake libffi || true - - save_cache: - paths: - - /usr/local/Homebrew - key: v5-cargo-cache-darwin-{{ arch }}-brew + # Installing cmake outside of brew to improve speed + curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz + tar xf cmake-3.4.1-Darwin-x86_64.tar.gz + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" - run: name: Install Rust command: | @@ -86,6 +75,7 @@ jobs: name: Execute tests command: | export PATH="$HOME/.cargo/bin:$PATH" + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" # We increase the ulimit for fixing cargo unclosed files in mac ulimit -n 8000 sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680 @@ -94,6 +84,7 @@ jobs: name: Execute integration tests command: | export PATH="$HOME/.cargo/bin:$PATH" + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" make integration-tests - save_cache: paths: @@ -118,8 +109,6 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - # sudo apt-get install texinfo - # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: name: Execute tests command: make test @@ -146,7 +135,6 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - - /usr/local/Homebrew key: v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build-macos: @@ -157,20 +145,13 @@ jobs: - restore_cache: keys: - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - - v5-cargo-cache-darwin-{{ arch }}-brew - # - run: - # name: Update Brew - # command: brew update || true - run: name: Install crate dependencies command: | - brew install cmake - # brew install libtool || true - # brew install autoconf cmake libffi || true - - save_cache: - paths: - - /usr/local/Homebrew - key: v5-cargo-cache-darwin-{{ arch }}-brew + # Installing cmake outside of brew to improve speed + curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz + tar xf cmake-3.4.1-Darwin-x86_64.tar.gz + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" - run: name: Install Rust command: | @@ -180,6 +161,7 @@ jobs: - run: name: Execute tests command: | + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH" # We increase the ulimit for fixing cargo unclosed files in mac ulimit -n 8000 @@ -188,6 +170,7 @@ jobs: - run: name: Make release build command: | + export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH" make release mkdir -p artifacts @@ -221,8 +204,6 @@ jobs: name: Install dependencies command: | sudo apt-get install -y cmake - # sudo apt-get install texinfo - # sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9 - run: rustup default nightly - run: make test - save_cache: From 15f1246f498f22447bbe92aa6d07d7fd84949887 Mon Sep 17 00:00:00 2001 From: Syrus Date: Tue, 22 Jan 2019 21:40:42 -0800 Subject: [PATCH 5/5] Updated cache keys --- .circleci/config.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94ee9beef65..8162eef72b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: - checkout - restore_cache: keys: - - v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + - v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Install dependencies command: | @@ -27,7 +27,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }} test: docker: @@ -36,7 +36,7 @@ jobs: - checkout - restore_cache: keys: - - v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Install dependencies command: | @@ -48,7 +48,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} test-macos: macos: @@ -57,7 +57,7 @@ jobs: - checkout - restore_cache: keys: - - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Install crate dependencies command: | @@ -88,14 +88,14 @@ jobs: make integration-tests - save_cache: paths: - - /usr/local/cargo/registry + - ~/.cargo/registry/ - target/debug/.fingerprint - target/debug/build - target/debug/deps - target/release/.fingerprint - target/release/build - target/release/deps - key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build: docker: @@ -104,7 +104,7 @@ jobs: - checkout - restore_cache: keys: - - v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + - v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Install dependencies command: | @@ -135,7 +135,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build-macos: macos: @@ -144,7 +144,7 @@ jobs: - checkout - restore_cache: keys: - - v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Install crate dependencies command: | @@ -183,14 +183,14 @@ jobs: - artifacts - save_cache: paths: - - /usr/local/cargo/registry + - ~/.cargo/registry/ - target/debug/.fingerprint - target/debug/build - target/debug/deps - target/release/.fingerprint - target/release/build - target/release/deps - key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} test-rust-nightly: docker: @@ -199,7 +199,7 @@ jobs: - checkout - restore_cache: keys: - - v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly + - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly - run: name: Install dependencies command: | @@ -212,7 +212,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly + key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly publish-github-release: docker: