1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-03-31 23:11:04 +00:00

Merge pull request 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

@ -8,13 +8,11 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
sudo apt-get install -y cmake 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: - run:
name: Install lint deps name: Install lint deps
command: | command: |
@ -29,7 +27,7 @@ jobs:
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - target/debug/deps
key: v5-lint-{{ arch }}-{{ checksum "Cargo.lock" }} key: v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
test: test:
docker: docker:
@ -38,13 +36,11 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
sudo apt-get install -y cmake 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 - run: make test
- save_cache: - save_cache:
paths: paths:
@ -52,7 +48,7 @@ jobs:
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - 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: test-macos:
macos: macos:
@ -61,20 +57,14 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-cargo-cache-darwin-{{ arch }}-brew
- run:
name: Update Brew
command: brew update || true
- run: - run:
name: Install crate dependencies name: Install crate dependencies
command: | command: |
brew install libtool || true # Installing cmake outside of brew to improve speed
brew install autoconf cmake libffi || true curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
- save_cache: tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
paths: export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- /usr/local/Homebrew
key: v5-cargo-cache-darwin-{{ arch }}-brew
- run: - run:
name: Install Rust name: Install Rust
command: | command: |
@ -85,6 +75,7 @@ jobs:
name: Execute tests name: Execute tests
command: | command: |
export PATH="$HOME/.cargo/bin:$PATH" 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 # We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000 ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680 sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
@ -93,17 +84,18 @@ jobs:
name: Execute integration tests name: Execute integration tests
command: | command: |
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
make integration-tests make integration-tests
- save_cache: - save_cache:
paths: paths:
- /usr/local/cargo/registry - ~/.cargo/registry/
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - target/debug/deps
- target/release/.fingerprint - target/release/.fingerprint
- target/release/build - target/release/build
- target/release/deps - target/release/deps
key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
test-and-build: test-and-build:
docker: docker:
@ -112,13 +104,11 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
sudo apt-get install -y cmake 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: - run:
name: Execute tests name: Execute tests
command: make test command: make test
@ -145,8 +135,7 @@ jobs:
- target/release/.fingerprint - target/release/.fingerprint
- target/release/build - target/release/build
- target/release/deps - target/release/deps
- /usr/local/Homebrew key: v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v5-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
test-and-build-macos: test-and-build-macos:
macos: macos:
@ -155,20 +144,14 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v5-cargo-cache-darwin-{{ arch }}-brew
- run:
name: Update Brew
command: brew update || true
- run: - run:
name: Install crate dependencies name: Install crate dependencies
command: | command: |
brew install libtool || true # Installing cmake outside of brew to improve speed
brew install autoconf cmake libffi || true curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
- save_cache: tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
paths: export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- /usr/local/Homebrew
key: v5-cargo-cache-darwin-{{ arch }}-brew
- run: - run:
name: Install Rust name: Install Rust
command: | command: |
@ -178,6 +161,7 @@ jobs:
- run: - run:
name: Execute tests name: Execute tests
command: | command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac # We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000 ulimit -n 8000
@ -186,6 +170,7 @@ jobs:
- run: - run:
name: Make release build name: Make release build
command: | command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
make release make release
mkdir -p artifacts mkdir -p artifacts
@ -198,14 +183,14 @@ jobs:
- artifacts - artifacts
- save_cache: - save_cache:
paths: paths:
- /usr/local/cargo/registry - ~/.cargo/registry/
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - target/debug/deps
- target/release/.fingerprint - target/release/.fingerprint
- target/release/build - target/release/build
- target/release/deps - target/release/deps
key: v5-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
test-rust-nightly: test-rust-nightly:
docker: docker:
@ -214,13 +199,11 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v5-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
sudo apt-get install -y cmake 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: rustup default nightly
- run: make test - run: make test
- save_cache: - save_cache:
@ -229,7 +212,7 @@ jobs:
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - 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: publish-github-release:
docker: docker:

@ -36,10 +36,63 @@ Wasmer is structured into different directories:
- [`src`](./src): code related to the wasmer excutable binary itself - [`src`](./src): code related to the wasmer excutable binary itself
- [`lib`](./lib): modularized libraries that Wasmer uses under the hood - [`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 ```sh
# checkout code # checkout code