Skip to content

Commit

Permalink
Merge pull request wasmerio#113 from wasmerio/feature/improved-depend…
Browse files Browse the repository at this point in the history
…encies

Removed unnecesary dependencies
  • Loading branch information
syrusakbary authored Jan 23, 2019
2 parents 38b0fbf + 15f1246 commit 3e7def0
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 45 deletions.
69 changes: 26 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand All @@ -38,21 +36,19 @@ 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:
- /usr/local/cargo/registry
- 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:
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e7def0

Please sign in to comment.