Skip to content

Commit

Permalink
Merge branch 'master' into feature/caching-fix-and-better-default-com…
Browse files Browse the repository at this point in the history
…piler
  • Loading branch information
syrusakbary authored Jul 25, 2019
2 parents 99b75c4 + c767b26 commit 4ada519
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
echo "${VERSION}" >> artifacts/version
echo "${CIRCLE_TAG}" >> artifacts/git_version
make build-install
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
cp ./wasmer.tar.gz ./artifacts/$(./scripts/binary-name.sh)
- run:
name: Dynamic library
command: |
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications"
mkdir -p artifacts
make build-install
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
cp ./wasmer.tar.gz ./artifacts/$(./scripts/binary-name.sh)
# VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
# echo "${VERSION}" >> artifacts/version
- run:
Expand Down
39 changes: 39 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
src/ @syrusakbary @MarkMcCaskey

# Backends
lib/singlepass-backend @losfair @nlewycky
lib/clif-backend @nlewycky @bjfish
lib/llvm-backend @nlewycky @losfair

# Runtime
lib/runtime-core @Hywan @bjfish
lib/runtime-abi @MarkMcCaskey
lib/runtime @MarkMcCaskey @Hywan @bjfish
lib/runtime-c-api @bjfish @Hywan
lib/win-exception-handler @bjfish @losfair
lib/middleware-common @bjfish @losfair

# Frontend integrations

## Emscripten
lib/emscripten @MarkMcCaskey @syrusakbary
lib/emscripten-tests @MarkMcCaskey @syrusakbary

## WASI
lib/wasi @MarkMcCaskey
lib/wasi-tests @MarkMcCaskey

## Spectests
lib/spectests @syrusakbary @MarkMcCaskey @nlewycky

# Kernel
lib/kernel-loader @losfair
lib/kernel-net @losfair

# Examples
examples @syrusakbary

# Documentation
docs @syrusakbary

21 changes: 13 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,39 @@ All PRs to the Wasmer repository must add to this file.
Blocks of changes will separated by version increments.

## **[Unreleased]**
- [#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`
- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to wasmer and implement it in the LLVM backend only.

## 0.5.7
- [#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)
- Updates LLVM to version 8.0

## 0.5.7 - 2019-07-23
- [#575](https://github.com/wasmerio/wasmer/pull/575) Prepare for release; update wapm to 0.3.6
- [#555](https://github.com/wasmerio/wasmer/pull/555) WASI filesystem rewrite. Major improvements
- adds virtual root showing all preopened directories
- improved sandboxing and code-reuse
- symlinks work in a lot more situations
- many misc. improvements to most syscalls touching the filesystem

## 0.5.6
## 0.5.6 - 2019-07-16
- [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6
- [#563](https://github.com/wasmerio/wasmer/pull/563) Improve wasi testing infrastructure
- fixes arg parsing from comments & fixes the mapdir test to have the native code doing the same thing as the WASI code
- 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

## 0.5.5
## 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
- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories
- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~

## 0.5.4
## 0.5.4 - 2019-07-06
- [#529](https://github.com/wasmerio/wasmer/pull/529) Updates the Wasm Interface library, which is used by wapm, with bug fixes and error message improvements

## 0.5.3
## 0.5.3 - 2019-07-03
- [#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
Expand Down
49 changes: 32 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<a href="https://spectrum.chat/wasmer">
<img src="https://withspectrum.github.io/badge/badge.svg" alt="Join the Wasmer Community">
</a>
<a href="https://twitter.com/wasmerio">
<img alt="Follow @wasmerio on Twitter" src="https://img.shields.io/twitter/follow/wasmerio?label=%40wasmerio&style=social">
</a>
</p>

## Introduction
Expand Down Expand Up @@ -45,21 +48,14 @@ Once installed, you will be able to run any WebAssembly files (_including Lua, P
```sh
# Run Lua
wasmer run examples/lua.wasm

# Run PHP
wasmer run examples/php.wasm

# Run SQLite
wasmer run examples/sqlite.wasm

# Run nginx
wasmer run examples/nginx/nginx.wasm -- -p examples/nginx -c nginx.conf
```

*You can find more `wasm/wat` examples in the [examples](./examples) directory.*

#### With WAPM

Installing Wasmer through `wasmer.io` includes
[wapm](https://github.com/wasmerio/wapm-cli), the WebAssembly package manager.
[`wapm`](https://github.com/wasmerio/wapm-cli), the [WebAssembly Package Manager](https://wapm.io/).

Wapm allows you to easily download, run, and distribute WebAssembly binaries.

Expand Down Expand Up @@ -99,10 +95,9 @@ curl https://sh.rustup.rs -sSf | sh

Please select your operating system:

- [macOS](#macos)
- [Debian-based Linuxes](#debian-based-linuxes)
- [FreeBSD](#freebsd)
- [Microsoft Windows](#windows-msvc)
<details>
<summary><b>macOS</b></summary>
<p>

#### macOS

Expand All @@ -118,17 +113,36 @@ Or, in case you have [MacPorts](https://www.macports.org/install.php):
sudo port install cmake
```

</p>
</details>

<details>
<summary><b>Debian-based Linuxes</b></summary>
<p>

#### Debian-based Linuxes

```sh
sudo apt install cmake pkg-config libssl-dev
```
</p>
</details>

<details>
<summary><b>FreeBSD</b></summary>
<p>

#### FreeBSD

```sh
pkg install cmake
```
</p>
</details>

<details>
<summary><b>Windows</b></summary>
<p>

#### Windows (MSVC)

Expand All @@ -148,6 +162,8 @@ nginx and Lua do not work on Windows. See [this issue](https://github.com/wasmer
5. Install [CMake](https://cmake.org/download/). Ensure CMake is in your PATH.

6. Install [LLVM 8.0](https://prereleases.llvm.org/win-snapshots/LLVM-8.0.0-r351033-win64.exe)
</p>
</details>

## Building

Expand Down Expand Up @@ -216,9 +232,8 @@ Below are some of the goals of this project (in order of priority):
- [x] It should be 100% compatible with the [WebAssembly spec tests](https://github.com/wasmerio/wasmer/tree/master/lib/spectests/spectests)
- [x] It should be fast _(partially achieved)_
- [x] Support WASI - released in [0.3.0](https://github.com/wasmerio/wasmer/releases/tag/0.3.0)
- [ ] Support Emscripten calls _(in the works)_
- [ ] Support Rust ABI calls
- [ ] Support Go ABI calls
- [x] Support Emscripten calls _(in the works)_
- [ ] Support Go js ABI calls

## Architecture

Expand Down
1 change: 1 addition & 0 deletions lib/clif-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ license = "MIT"
authors = ["The Wasmer Engineering Team <[email protected]>"]
repository = "https://github.com/wasmerio/wasmer"
edition = "2018"
readme = "README.md"

[dependencies]
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
Expand Down
24 changes: 23 additions & 1 deletion lib/clif-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,26 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
compatible with Emscripten, Rust and Go. [Learn
more](https://github.com/wasmerio/wasmer).

This crate represents the Cranelift backend.
This crate represents the Cranelift backend integration for Wasmer.

## Usage

### Usage in Wasmer Standalone

If you are using the `wasmer` CLI, you can specify the backend with:

```bash
wasmer run program.wasm --backend=cranelift
```

### Usage in Wasmer Embedded

If you are using Wasmer Embedded, you can specify
the Cranelift backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):

```rust
use wasmer_clif_backend::CraneliftCompiler;

// ...
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &CraneliftCompiler::new());
```
1 change: 1 addition & 0 deletions lib/llvm-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "wasmer-llvm-backend"
version = "0.5.7"
authors = ["Lachlan Sneff <[email protected]>"]
edition = "2018"
readme = "README.md"

[dependencies]
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
Expand Down
24 changes: 23 additions & 1 deletion lib/llvm-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,26 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
compatible with Emscripten, Rust and Go. [Learn
more](https://github.com/wasmerio/wasmer).

This crate represents the LLVM backend.
This crate represents the LLVM backend integration for Wasmer.

## Usage

### Usage in Wasmer Standalone

If you are using the `wasmer` CLI, you can specify the backend with:

```bash
wasmer run program.wasm --backend=llvm
```

### Usage in Wasmer Embedded

If you are using Wasmer Embedded, you can specify
the LLVM backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):

```rust
use wasmer_llvm_backend::LLVMCompiler;

// ...
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &LLVMCompiler::new());
```
1 change: 1 addition & 0 deletions lib/singlepass-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description = "Wasmer runtime single pass compiler backend"
license = "MIT"
authors = ["The Wasmer Engineering Team <[email protected]>"]
edition = "2018"
readme = "README.md"

[dependencies]
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
Expand Down
25 changes: 24 additions & 1 deletion lib/singlepass-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,27 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
compatible with Emscripten, Rust and Go. [Learn
more](https://github.com/wasmerio/wasmer).

This crate represents the singlepass backend.

This crate represents the Singlepass backend integration for Wasmer.

## Usage

### Usage in Wasmer Standalone

If you are using the `wasmer` CLI, you can specify the backend with:

```bash
wasmer run program.wasm --backend=singlepass
```

### Usage in Wasmer Embedded

If you are using Wasmer Embedded, you can specify
the LLVM backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):

```rust
use wasmer_singlepass_backend::SinglepassCompiler;

// ...
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &SinglepassCompiler::new());
```
File renamed without changes.
File renamed without changes.

0 comments on commit 4ada519

Please sign in to comment.