Skip to content

Commit

Permalink
Merge branch 'master' into ventuzelo/fix-857-panic-loader-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
pventuzelo authored Nov 5, 2019
2 parents 0fd5a37 + 5f9670f commit 006bce0
Show file tree
Hide file tree
Showing 90 changed files with 6,033 additions and 3,241 deletions.
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Changelog

All PRs to the Wasmer repository must add to this file.
## **[Unreleased]**

Blocks of changes will separated by version increments.
- [#921](https://github.com/wasmerio/wasmer/pull/921) In LLVM backend, annotate all memory accesses with TBAA metadata.
- [#883](https://github.com/wasmerio/wasmer/pull/883) Allow floating point operations to have arbitrary inputs, even including SNaNs.
- [#856](https://github.com/wasmerio/wasmer/pull/856) Expose methods in the runtime C API to get a WASI import object

## **[Unreleased]**
## 0.9.0 - 2019-10-23

Special thanks to @alocquet for their contributions!

- [#898](https://github.com/wasmerio/wasmer/pull/898) State tracking is now disabled by default in the LLVM backend. It can be enabled with `--track-state`.
- [#861](https://github.com/wasmerio/wasmer/pull/861) Add descriptions to `unimplemented!` macro in various places
- [#897](https://github.com/wasmerio/wasmer/pull/897) Removes special casing of stdin, stdout, and stderr in WASI. Closing these files now works. Removes `stdin`, `stdout`, and `stderr` from `WasiFS`, replaced by the methods `stdout`, `stdout_mut`, and so on.
- [#863](https://github.com/wasmerio/wasmer/pull/863) Fix min and max for cases involving NaN and negative zero when using the LLVM backend.

- [#858](https://github.com/wasmerio/wasmer/pull/858) Minor panic fix when wasmer binary with `loader` option run a module without exported `_start` function

Expand Down
762 changes: 308 additions & 454 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmer"
version = "0.8.0"
version = "0.9.0"
authors = ["The Wasmer Engineering Team <[email protected]>"]
edition = "2018"
repository = "https://github.com/wasmerio/wasmer"
Expand Down Expand Up @@ -43,6 +43,7 @@ members = [
"lib/singlepass-backend",
"lib/runtime",
"lib/runtime-core",
"lib/runtime-core-tests",
"lib/emscripten",
"lib/spectests",
"lib/win-exception-handler",
Expand Down
73 changes: 68 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@ wasitests: wasitests-unit wasitests-singlepass wasitests-cranelift wasitests-llv
# Backends
singlepass: spectests-singlepass emtests-singlepass middleware-singlepass wasitests-singlepass
cargo test -p wasmer-singlepass-backend --release
cargo test -p wasmer-runtime-core-tests --release --no-default-features --features backend-singlepass

cranelift: spectests-cranelift emtests-cranelift middleware-cranelift wasitests-cranelift
cargo test -p wasmer-clif-backend --release
cargo test -p wasmer-runtime-core-tests --release

llvm: spectests-llvm emtests-llvm wasitests-llvm
cargo test -p wasmer-llvm-backend --release
cargo test -p wasmer-runtime-core-tests --release --no-default-features --features backend-llvm


# All tests
Expand All @@ -105,8 +108,23 @@ capi:
test-capi: capi
cargo test -p wasmer-runtime-c-api --release

capi-test: test-capi

test-rest:
cargo test --release --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-wasi --exclude wasmer-middleware-common --exclude wasmer-middleware-common-tests --exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-llvm-backend --exclude wasmer-wasi-tests --exclude wasmer-emscripten-tests
cargo test --release \
--all \
--exclude wasmer-runtime-c-api \
--exclude wasmer-emscripten \
--exclude wasmer-spectests \
--exclude wasmer-wasi \
--exclude wasmer-middleware-common \
--exclude wasmer-middleware-common-tests \
--exclude wasmer-singlepass-backend \
--exclude wasmer-clif-backend \
--exclude wasmer-llvm-backend \
--exclude wasmer-wasi-tests \
--exclude wasmer-emscripten-tests \
--exclude wasmer-runtime-core-tests

circleci-clean:
@if [ ! -z "${CIRCLE_JOB}" ]; then rm -f /home/circleci/project/target/debug/deps/libcranelift_wasm* && rm -f /Users/distiller/project/target/debug/deps/libcranelift_wasm*; fi;
Expand Down Expand Up @@ -140,20 +158,65 @@ install:

# Checks
check-bench-singlepass:
cargo bench --all --no-run --no-default-features --features "backend-singlepass" \
cargo check --benches --all --no-default-features --features "backend-singlepass" \
--exclude wasmer-clif-backend --exclude wasmer-llvm-backend --exclude wasmer-kernel-loader
check-bench-clif:
cargo bench --all --no-run --no-default-features --features "backend-cranelift" \
cargo check --benches --all --no-default-features --features "backend-cranelift" \
--exclude wasmer-singlepass-backend --exclude wasmer-llvm-backend --exclude wasmer-kernel-loader \
--exclude wasmer-middleware-common-tests
check-bench-llvm:
cargo bench --all --no-run --no-default-features --features "backend-llvm" \
cargo check --benches --all --no-default-features --features "backend-llvm" \
--exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-kernel-loader

check-bench: check-bench-singlepass check-bench-llvm

# TODO: We wanted `--workspace --exclude wasmer-runtime`, but can't due
# to https://github.com/rust-lang/cargo/issues/6745 .
NOT_RUNTIME_CRATES = -p wasmer-clif-backend -p wasmer-singlepass-backend -p wasmer-middleware-common -p wasmer-runtime-core -p wasmer-emscripten -p wasmer-llvm-backend -p wasmer-wasi -p wasmer-kernel-loader -p wasmer-dev-utils -p wasmer-wasi-tests -p wasmer-middleware-common-tests -p wasmer-emscripten-tests
RUNTIME_CHECK = cargo check --manifest-path lib/runtime/Cargo.toml --no-default-features
check: check-bench
cargo check --release --features backend-singlepass,backend-llvm,loader-kernel,debug
cargo check $(NOT_RUNTIME_CRATES)
cargo check --release $(NOT_RUNTIME_CRATES)
cargo check --all-features $(NOT_RUNTIME_CRATES)
cargo check --release --all-features $(NOT_RUNTIME_CRATES)
# wasmer-runtime doesn't work with all backends enabled at once.
#
# We test using manifest-path directly so as to disable the default.
# `--no-default-features` only disables the default features in the
# current package, not the package specified by `-p`. This is
# intentional.
#
# Test default features, test 'debug' feature only in non-release
# builds, test as many combined features as possible with each backend
# as default, and test a minimal set of features with only one backend
# at a time.
cargo check --manifest-path lib/runtime/Cargo.toml
cargo check --release --manifest-path lib/runtime/Cargo.toml

$(RUNTIME_CHECK) \
--features=cranelift,cache,debug,llvm,singlepass,default-backend-singlepass
$(RUNTIME_CHECK) --release \
--features=cranelift,cache,llvm,singlepass,default-backend-singlepass
$(RUNTIME_CHECK) \
--features=cranelift,cache,debug,llvm,singlepass,default-backend-cranelift
$(RUNTIME_CHECK) --release \
--features=cranelift,cache,llvm,singlepass,default-backend-cranelift
$(RUNTIME_CHECK) \
--features=cranelift,cache,debug,llvm,singlepass,default-backend-llvm
$(RUNTIME_CHECK) --release \
--features=cranelift,cache,llvm,singlepass,default-backend-llvm
$(RUNTIME_CHECK) \
--features=singlepass,default-backend-singlepass,debug
$(RUNTIME_CHECK) --release \
--features=singlepass,default-backend-singlepass
$(RUNTIME_CHECK) \
--features=cranelift,default-backend-cranelift,debug
$(RUNTIME_CHECK) --release \
--features=cranelift,default-backend-cranelift
$(RUNTIME_CHECK) \
--features=llvm,default-backend-llvm,debug
$(RUNTIME_CHECK) --release \
--features=llvm,default-backend-llvm

# Release
release:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Wasmer runtime can be used as a library embedded in different languages, so you
| ![PHP logo](./docs/assets/languages/php.svg) | [**PHP**](https://github.com/wasmerio/php-ext-wasm) | Wasmer | actively developed | <a href="https://pecl.php.net/package/wasm" target="_blank">![last release](https://img.shields.io/github/v/release/wasmerio/php-ext-wasm?style=flat-square)</a> | ![number of Github stars](https://img.shields.io/github/stars/wasmerio/php-ext-wasm?style=flat-square) |
| ![Ruby logo](./docs/assets/languages/ruby.svg) | [**Ruby**](https://github.com/wasmerio/ruby-ext-wasm) | Wasmer | actively developed | <a href="https://rubygems.org/gems/wasmer" target="_blank">![last release](https://img.shields.io/gem/v/wasmer?style=flat-square)</a> | ![number of Github stars](https://img.shields.io/github/stars/wasmerio/ruby-ext-wasm?style=flat-square) |
| ![Postgres logo](./docs/assets/languages/postgres.svg) | [**Postgres**](https://github.com/wasmerio/postgres-ext-wasm) | Wasmer | actively developed | <a href="https://github.com/wasmerio/postgres-ext-wasm" target="_blank">![last release](https://img.shields.io/github/v/release/wasmerio/postgres-ext-wasm?style=flat-square)</a> | ![number of Github stars](https://img.shields.io/github/stars/wasmerio/postgres-ext-wasm?style=flat-square) |
| ![JS Logo](./docs/assets/languages/js.svg) | [**JavaScript**](https://github.com/wasmerio/wasmer-js) | Wasmer | actively developed | <a href="https://www.npmjs.com/package/@wasmer/wasi" target="_blank">![last release](https://img.shields.io/npm/v/@wasmer/wasi?style=flat-square)</a> | ![number of Github stars](https://img.shields.io/github/stars/wasmerio/wasmer-js?style=flat-square) |
| ![C# logo](./docs/assets/languages/csharp.svg) | [**C#/.Net**](https://github.com/migueldeicaza/WasmerSharp) | [Miguel de Icaza](https://github.com/migueldeicaza) | actively developed | <a href="https://www.nuget.org/packages/WasmerSharp/" target="_blank">![last release](https://img.shields.io/nuget/v/WasmerSharp?style=flat-square)</a> | ![number of Github stars](https://img.shields.io/github/stars/migueldeicaza/WasmerSharp?style=flat-square) |
| ![R logo](./docs/assets/languages/r.svg) | [**R**](https://github.com/dirkschumacher/wasmr) | [Dirk Schumacher](https://github.com/dirkschumacher) | actively developed | | ![number of Github stars](https://img.shields.io/github/stars/dirkschumacher/wasmr?style=flat-square) |
| ![Swift logo](./docs/assets/languages/swift.svg) | [**Swift**](https://github.com/markmals/swift-ext-wasm) | [Mark Malström](https://github.com/markmals/) | passively maintained | | ![number of Github stars](https://img.shields.io/github/stars/markmals/swift-ext-wasm?style=flat-square) |
Expand Down
4 changes: 4 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
cat /proc/meminfo
displayName: System info - Extended (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- bash: |
sysctl -a | grep machdep.cpu
displayName: System info - Extended (Mac)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
- bash: make test
displayName: Tests (*nix)
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT')))
Expand Down
8 changes: 8 additions & 0 deletions docs/assets/languages/js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions docs/feature_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,32 @@
| OSR | 🔄 |||
| SIMD ||||
| WASI ||||
| WASMER_BACKTRACE ||||

## Operating System
| &nbsp; | GNU Linux | Mac OSX | Windows NT |
| - | :-: | :-: | :-: |
| Cranelift Backend ||||
| LLVM Backend ||||
| Singlepass Backend | [#347](https://github.com/wasmerio/wasmer/issues/347) |||
| WASI |||* |

* `poll_fd` is not fully implemented for Windows yet

## Language integration

TODO: define a set of features that are relevant and mark them here

Current ideas:

- WASI FS API
- Callbacks
- Exiting early in hostcall
- Metering
- Caching

> TODO: expand this table, it's focused on new features that we haven't implemented yet and doesn't list all language integrations
| &nbsp; | Rust | C / C++ | Go | Python | Ruby |
| - | :-: | :-: | :-: | :-: | :-: |
| Terminate in host call ||||||
| WASI ||| 🔄 |||
| WASI FS API ||||||
6 changes: 3 additions & 3 deletions lib/clif-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmer-clif-backend"
version = "0.8.0"
version = "0.9.0"
description = "Wasmer runtime Cranelift compiler backend"
license = "MIT"
authors = ["The Wasmer Engineering Team <[email protected]>"]
Expand All @@ -9,7 +9,7 @@ edition = "2018"
readme = "README.md"

[dependencies]
wasmer-runtime-core = { path = "../runtime-core", version = "0.8.0" }
wasmer-runtime-core = { path = "../runtime-core", version = "0.9.0" }
cranelift-native = "0.44.0"
cranelift-codegen = "0.44.0"
cranelift-entity = "0.44.0"
Expand All @@ -35,7 +35,7 @@ version = "0.0.7"

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["errhandlingapi", "minwindef", "minwinbase", "winnt"] }
wasmer-win-exception-handler = { path = "../win-exception-handler", version = "0.8.0" }
wasmer-win-exception-handler = { path = "../win-exception-handler", version = "0.9.0" }

[features]
debug = ["wasmer-runtime-core/debug"]
Loading

0 comments on commit 006bce0

Please sign in to comment.