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/.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 + diff --git a/CHANGELOG.md b/CHANGELOG.md index c81eae7bbf8..3cdbc36b91c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,15 @@ 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 @@ -16,7 +21,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 @@ -24,15 +29,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 diff --git a/README.md b/README.md index 21c9a0ba3b8..356ad826b28 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ Join the Wasmer Community + + Follow @wasmerio on Twitter +

## Introduction @@ -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. @@ -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) +
+ macOS +

#### macOS @@ -118,17 +113,36 @@ 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 +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) +

+
## Building @@ -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 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()); +``` 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