Skip to content

Commit

Permalink
Merge branch 'master' into wasmer-c-api-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish authored Aug 1, 2019
2 parents 784e65d + d117a46 commit d9e1609
Show file tree
Hide file tree
Showing 66 changed files with 1,490 additions and 614 deletions.
42 changes: 16 additions & 26 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@ environment:
cache:
- 'C:\Users\appveyor\.cargo'
- target
- wapm-cli-target

install:
# # Install LLVM
# - mkdir C:\projects\deps
# - cd C:\projects\deps
# - appveyor DownloadFile https://prereleases.llvm.org/win-snapshots/LLVM-8.0.0-r351033-win64.exe -FileName llvm.exe
# - 7z x llvm.exe -oC:\projects\deps\llvm
# # - set "PATH=%PATH%;C:\projects\deps\llvm\bin"
# - set "LLD_LINK=C:\projects\deps\llvm\bin\lld-link.exe"
# - set "LLVM_SYS_80_PREFIX=C:\projects\deps\llvm"
# - cd "%APPVEYOR_BUILD_FOLDER%"
# Install LLVM
- mkdir C:\projects\deps
- cd C:\projects\deps
- appveyor DownloadFile https://github.com/wasmerio/windows-llvm-build/releases/download/v8.0.0/llvm-8.0.0-install.zip -FileName llvm-8.0.0-install.zip
- 7z x llvm-8.0.0-install.zip
- C:\projects\deps\llvm-8.0.0-install\bin\llvm-config.exe --version
- set "LLVM_SYS_80_PREFIX=C:\projects\deps\llvm-8.0.0-install"
- cd "%APPVEYOR_BUILD_FOLDER%"

# Install Rust
# uncomment these lines if the cache is cleared, or if we must re-install rust for some reason
# - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
# - rustup-init.exe -yv --default-host %target%
- set PATH=%PATH%;C:\\Libraries\\llvm-5.0.0\\bin;%USERPROFILE%\.cargo\bin
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init.exe -yv --default-host %target%
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustup default stable-%target%
- rustup update
- rustc -vV
Expand All @@ -49,25 +47,17 @@ install:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

build_script:
- cargo build --release --verbose
- git submodule init
- git submodule update
# Cache wapm cli target in dir above to prevent breaking git submodule on windows
- if not exist wapm-cli-target mkdir wapm-cli-target
- move wapm-cli-target wapm-cli
- cd wapm-cli
- rename wapm-cli-target target
- cd ..
- cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications"
- cd wapm-cli
- cd ..
- xcopy wapm-cli\target wapm-cli-target\ /i /y
- cargo build --release --verbose --features backend-llvm
- cargo build --release --manifest-path lib/runtime-c-api/Cargo.toml

test_script:
- cargo test --manifest-path lib/spectests/Cargo.toml --features clif

before_deploy:
- appveyor PushArtifact target\release\wasmer_runtime_c_api.dll
- git submodule init
- git submodule update
- cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications"
- cd ./src/installer
- iscc wasmer.iss
- copy /y .\WasmerInstaller.exe ..\..\WasmerInstaller-%APPVEYOR_REPO_TAG_NAME%.exe
Expand Down
28 changes: 28 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ jobs:
name: Check
command: |
make check
make compile-bench-singlepass
# TODO: add compile-bench-llvm and compile-bench-clif when they work
- run:
name: Release
command: make release-fast
Expand All @@ -129,6 +131,26 @@ jobs:
- target/release/deps
key: v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}

test-rust-example:
docker:
- image: circleci/rust:latest
<<: *run_with_build_env_vars
steps:
- checkout
- run:
name: "Check Wasmer Rust example"
command: |
git clone https://github.com/wasmerio/wasmer-rust-example
rustup default stable
rustup target add wasm32-unknown-unknown
cd wasmer-rust-example
cd wasm-sample-app
cargo build --release
cd ..
sed -i 's/wasmer-runtime.*/wasmer-runtime = \{ path = "..\/lib\/runtime" \}/g' Cargo.toml
cargo run
cargo test
test-macos:
macos:
xcode: "9.0"
Expand Down Expand Up @@ -383,6 +405,12 @@ workflows:
only:
- trying
- staging
- test-rust-example:
filters:
branches:
only:
- trying
- staging
- test-macos:
filters:
branches:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All PRs to the Wasmer repository must add to this file.
Blocks of changes will separated by version increments.

## **[Unreleased]**

## 0.6.0 - 2019-07-31
- [#603](https://github.com/wasmerio/wasmer/pull/603) Update Wapm-cli, bump version numbers
- [#595](https://github.com/wasmerio/wasmer/pull/595) Add unstable public API for interfacing with the WASI file system in plugin-like usecases
- [#598](https://github.com/wasmerio/wasmer/pull/598) LLVM Backend is now supported in Windows
- [#599](https://github.com/wasmerio/wasmer/pull/599) Fix llvm backend failures in fat spec tests and simd_binaryen spec test.
- [#579](https://github.com/wasmerio/wasmer/pull/579) Fix bug in caching with LLVM and Singlepass backends.
Add `default-backend-singlepass`, `default-backend-llvm`, and `default-backend-cranelift` features to `wasmer-runtime`
to control the `default_compiler()` function (this is a breaking change). Add `compiler_for_backend` function in `wasmer-runtime`
- [#561](https://github.com/wasmerio/wasmer/pull/561) Call the `data_finalizer` field on the `Ctx`
- [#576](https://github.com/wasmerio/wasmer/pull/576) fix `Drop` of uninit `Ctx`
- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to Wasmer (LLVM backend only)
Expand All @@ -25,6 +34,8 @@ Blocks of changes will separated by version increments.
- makes wasitests-generate output stdout/stderr by default & adds function to print stdout and stderr for a command if it fails
- compiles wasm with size optimizations & strips generated wasm with wasm-strip
- [#554](https://github.com/wasmerio/wasmer/pull/554) Finish implementation of `wasi::fd_seek`, fix bug in filestat
- [#550](https://github.com/wasmerio/wasmer/pull/550) Fix singlepass compilation error with `imul` instruction


## 0.5.5 - 2019-07-10
- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend
Expand All @@ -38,6 +49,7 @@ Blocks of changes will separated by version increments.
- [#523](https://github.com/wasmerio/wasmer/pull/523) Update wapm version to fix bug related to signed packages in the global namespace and locally-stored public keys

## 0.5.2 - 2019-07-02
- [#516](https://github.com/wasmerio/wasmer/pull/516) Add workaround for singlepass miscompilation on GetLocal
- [#521](https://github.com/wasmerio/wasmer/pull/521) Update Wapm-cli, bump version numbers
- [#518](https://github.com/wasmerio/wasmer/pull/518) Update Cranelift and WasmParser
- [#514](https://github.com/wasmerio/wasmer/pull/514) [#519](https://github.com/wasmerio/wasmer/pull/519) Improved Emscripten network related calls, added a null check to `WasmPtr`
Expand Down
20 changes: 11 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 19 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmer"
version = "0.5.7"
version = "0.6.0"
authors = ["The Wasmer Engineering Team <[email protected]>"]
edition = "2018"
repository = "https://github.com/wasmerio/wasmer"
Expand Down Expand Up @@ -66,15 +66,30 @@ glob = "0.2.11"
rustc_version = "0.2.3"

[features]
default = ["fast-tests", "wasi"]
default = ["fast-tests", "wasi", "backend-cranelift"]
"loader-kernel" = ["wasmer-kernel-loader"]
debug = ["wasmer-runtime-core/debug"]
trace = ["wasmer-runtime-core/trace"]
extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
# This feature will allow cargo test to run much faster
fast-tests = []
"backend-llvm" = ["wasmer-llvm-backend", "wasmer-runtime-core/backend-llvm"]
"backend-singlepass" = ["wasmer-singlepass-backend", "wasmer-runtime-core/backend-singlepass"]
backend-cranelift = [
"wasmer-runtime-core/backend-cranelift",
"wasmer-runtime/cranelift",
"wasmer-middleware-common/clif"
]
backend-llvm = [
"wasmer-llvm-backend",
"wasmer-runtime-core/backend-llvm",
"wasmer-runtime/llvm",
"wasmer-middleware-common/llvm"
]
backend-singlepass = [
"wasmer-singlepass-backend",
"wasmer-runtime-core/backend-singlepass",
"wasmer-runtime/singlepass",
"wasmer-middleware-common/singlepass"
]
wasi = ["wasmer-wasi"]
# vfs = ["wasmer-runtime-abi"]

Expand Down
13 changes: 13 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:19.04

ARG RUST_TOOLCHAIN="nightly"

ENV CARGO_HOME=/usr/local/rust
ENV RUSTUP_HOME=/usr/local/rust
ENV PATH="$PATH:$CARGO_HOME/bin"

RUN apt-get update \
&& apt-get -y install sudo strace curl cmake pkg-config python libssl-dev llvm-dev libz-dev gnuplot-nox \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,20 @@ release-singlepass:
release-llvm:
cargo build --release --features backend-llvm

bench:
cargo bench --all
bench-singlepass:
cargo bench --all --no-default-features --features "backend-singlepass"
bench-clif:
cargo bench --all --no-default-features --features "backend-clif"
bench-llvm:
cargo bench --all --no-default-features --features "backend-llvm"

# compile but don't run the benchmarks
compile-bench-singlepass:
cargo bench --all --no-run --no-default-features --features "backend-singlepass"
compile-bench-clif:
cargo bench --all --no-run --no-default-features --features "backend-clif"
compile-bench-llvm:
cargo bench --all --no-run --no-default-features --features "backend-llvm"


# Build utils
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ Each integration can be tested separately:
Benchmarks can be run with:

```sh
make bench
make bench-[backend]

# for example
make bench-singlepass
```

## Roadmap
Expand Down
1 change: 1 addition & 0 deletions bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status = [
"ci/circleci: test",
"ci/circleci: test-macos",
"ci/circleci: test-stable",
"ci/circleci: test-rust-example",
"continuous-integration/appveyor/branch"
]
required_approvals = 1
Expand Down
Loading

0 comments on commit d9e1609

Please sign in to comment.