From ac859ac531d2dbd1c2305a70f2923544716bd7c8 Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 17:32:04 -0700 Subject: [PATCH 1/9] Added CODEOWNERS file --- .github/CODEOWNERS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..f10837c3428 --- /dev/null +++ b/.github/CODEOWNERS @@ -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 + From c89848f984644a4d9197bd9d756bdbc1a082c2ee Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 17:36:08 -0700 Subject: [PATCH 2/9] Moved scripts to scripts folder --- .circleci/config.yml | 4 ++-- binary-name.sh => scripts/binary-name.sh | 0 .../update_version_numbers.sh | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename binary-name.sh => scripts/binary-name.sh (100%) rename update_version_numbers.sh => scripts/update_version_numbers.sh (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e8fca019f4..2461e71bfd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: | @@ -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: diff --git a/binary-name.sh b/scripts/binary-name.sh similarity index 100% rename from binary-name.sh rename to scripts/binary-name.sh diff --git a/update_version_numbers.sh b/scripts/update_version_numbers.sh similarity index 100% rename from update_version_numbers.sh rename to scripts/update_version_numbers.sh From 3bca3ee983a055b0ab51fb9b077dd6c2d25f73e1 Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 17:42:03 -0700 Subject: [PATCH 3/9] Make dependency installation easier to read --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 21c9a0ba3b8..c0fc635fe7b 100644 --- a/README.md +++ b/README.md @@ -99,10 +99,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) +
+ macOS +

#### macOS @@ -118,17 +117,35 @@ Or, in case you have [MacPorts](https://www.macports.org/install.php): sudo port install cmake ``` +

+
+ +
+ Debian-based Linuxes +

#### Debian-based Linuxes ```sh sudo apt install cmake pkg-config libssl-dev ``` +

+
+ +
+ FreeBSD +

#### FreeBSD ```sh pkg install cmake ``` +

+
+ +
+ Windows +

#### Windows (MSVC) @@ -148,6 +165,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) +

+
## Building From 0f5131303dafc4974e3b9a98ca3cec71c83f10fc Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 17:43:17 -0700 Subject: [PATCH 4/9] Simplified examples --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c0fc635fe7b..c3d8c2b31f9 100644 --- a/README.md +++ b/README.md @@ -45,17 +45,10 @@ 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 From 0191de4e50ebe5cf4b3fff0af1ed473968c14106 Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 17:44:06 -0700 Subject: [PATCH 5/9] Improved WAPM mentions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3d8c2b31f9..398329efd7e 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ wasmer run examples/lua.wasm #### 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. From 76daa7b3fd17e964c5cf037bb8d753bbecb15aac Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 18:06:59 -0700 Subject: [PATCH 6/9] Improved Wasmer Backends documentation --- lib/clif-backend/Cargo.toml | 1 + lib/clif-backend/README.md | 24 +++++++++++++++++++++++- lib/llvm-backend/Cargo.toml | 1 + lib/llvm-backend/README.md | 24 +++++++++++++++++++++++- lib/singlepass-backend/Cargo.toml | 1 + lib/singlepass-backend/README.md | 25 ++++++++++++++++++++++++- 6 files changed, 73 insertions(+), 3 deletions(-) diff --git a/lib/clif-backend/Cargo.toml b/lib/clif-backend/Cargo.toml index 99b5cb2efc7..e6e37e51945 100644 --- a/lib/clif-backend/Cargo.toml +++ b/lib/clif-backend/Cargo.toml @@ -6,6 +6,7 @@ license = "MIT" authors = ["The Wasmer Engineering Team "] repository = "https://github.com/wasmerio/wasmer" edition = "2018" +readme = "README.md" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } diff --git a/lib/clif-backend/README.md b/lib/clif-backend/README.md index eb0c17e8cae..2f29f4543ba 100644 --- a/lib/clif-backend/README.md +++ b/lib/clif-backend/README.md @@ -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()); +``` diff --git a/lib/llvm-backend/Cargo.toml b/lib/llvm-backend/Cargo.toml index 4bc38202cba..30d125917a6 100644 --- a/lib/llvm-backend/Cargo.toml +++ b/lib/llvm-backend/Cargo.toml @@ -3,6 +3,7 @@ name = "wasmer-llvm-backend" version = "0.5.7" authors = ["Lachlan Sneff "] edition = "2018" +readme = "README.md" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } diff --git a/lib/llvm-backend/README.md b/lib/llvm-backend/README.md index f53a0cb3114..08dc5c5d9dd 100644 --- a/lib/llvm-backend/README.md +++ b/lib/llvm-backend/README.md @@ -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()); +``` diff --git a/lib/singlepass-backend/Cargo.toml b/lib/singlepass-backend/Cargo.toml index b8e464be0b5..fda6a36db2b 100644 --- a/lib/singlepass-backend/Cargo.toml +++ b/lib/singlepass-backend/Cargo.toml @@ -6,6 +6,7 @@ description = "Wasmer runtime single pass compiler backend" license = "MIT" authors = ["The Wasmer Engineering Team "] edition = "2018" +readme = "README.md" [dependencies] wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } diff --git a/lib/singlepass-backend/README.md b/lib/singlepass-backend/README.md index 3d8c63615f5..bf477a3388b 100644 --- a/lib/singlepass-backend/README.md +++ b/lib/singlepass-backend/README.md @@ -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()); +``` From 680e4b8577895ba8f5e95946790aecf9e7e33bed Mon Sep 17 00:00:00 2001 From: Syrus Date: Wed, 24 Jul 2019 18:15:18 -0700 Subject: [PATCH 7/9] Improved README installation instructions --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 398329efd7e..8880d34224e 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ curl https://sh.rustup.rs -sSf | sh Please select your operating system:
- macOS + macOS

#### macOS @@ -114,8 +114,9 @@ sudo port install cmake

- Debian-based Linuxes + Debian-based Linuxes

+ #### Debian-based Linuxes ```sh @@ -125,7 +126,7 @@ sudo apt install cmake pkg-config libssl-dev

- FreeBSD + FreeBSD

#### FreeBSD @@ -137,7 +138,7 @@ pkg install cmake

- Windows + Windows

#### Windows (MSVC) @@ -228,9 +229,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 From 947de78c3edc5b90ff7191fa7cde93b83048a6bc Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 24 Jul 2019 18:35:57 -0700 Subject: [PATCH 8/9] Added Twitter badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8880d34224e..356ad826b28 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ Join the Wasmer Community + + Follow @wasmerio on Twitter +

## Introduction From c767b265d7a40a596094c707992e4812d1b779ad Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 24 Jul 2019 18:50:26 -0700 Subject: [PATCH 9/9] Improved CHANGELOG Added dates to different versions and updated missing PRs --- CHANGELOG.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e097611c89..2b534d6a1f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,12 @@ All PRs to the Wasmer repository must add to this file. Blocks of changes will separated by version increments. ## **[Unreleased]** -- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to wasmer and implement it in the LLVM backend only. +- [#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 +## 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 @@ -15,7 +18,7 @@ Blocks of changes will separated by version increments. - 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 @@ -23,15 +26,15 @@ Blocks of changes will separated by version increments. - 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