Merge pull request #113 from wasmerio/feature/improved-dependencies

Removed unnecesary dependencies
This commit is contained in:
Syrus Akbary 2019-01-23 01:05:19 -05:00 committed by GitHub
commit 3e7def07c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 45 deletions

View File

@ -8,13 +8,11 @@ jobs:
- checkout
- restore_cache:
keys:
- v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
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: |
@ -29,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:
@ -38,13 +36,11 @@ 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: |
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:
@ -52,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:
@ -61,20 +57,14 @@ jobs:
- checkout
- 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
- v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install crate dependencies
command: |
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: |
@ -85,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
@ -93,17 +84,18 @@ 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:
- /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:
@ -112,13 +104,11 @@ 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: |
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
@ -145,8 +135,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
- /usr/local/Homebrew
key: v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
test-and-build-macos:
macos:
@ -155,20 +144,14 @@ jobs:
- checkout
- 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
- v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install crate dependencies
command: |
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: |
@ -178,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
@ -186,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
@ -198,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:
@ -214,13 +199,11 @@ 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: |
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:
@ -229,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:

View File

@ -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