606: Cleanup Wasmer r=syrusakbary a=syrusakbary

This PR moves a few things around trying to make Wasmer more compelling to use:
* Two less directories on the root (`fuzz` is moved to the `lib/` folder, `media` is moved to `src/installer` folder)
* Improved README
* Moved `ARCHITECTURE.md` into the `docs` folder.

Co-authored-by: Syrus <me@syrusakbary.com>
This commit is contained in:
bors[bot] 2019-08-01 04:25:30 +00:00
commit 2b6e58962b
9 changed files with 31 additions and 34 deletions

View File

@ -75,9 +75,6 @@ jobs:
make cranelift make cranelift
make llvm make llvm
make test-rest make test-rest
- run:
name: Release
command: make release-fast
- run: - run:
name: Integration Tests name: Integration Tests
command: make integration-tests command: make integration-tests
@ -116,10 +113,8 @@ jobs:
command: | command: |
make check make check
make compile-bench-singlepass make compile-bench-singlepass
# TODO: add compile-bench-llvm and compile-bench-clif when they work make compile-bench-llvm
- run: # TODO: add compile-bench-clif when it works
name: Release
command: make release-fast
- run: - run:
name: Integration Tests name: Integration Tests
command: make integration-tests command: make integration-tests
@ -195,11 +190,6 @@ jobs:
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export LLVM_SYS_80_PREFIX="`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/" export LLVM_SYS_80_PREFIX="`pwd`/clang+llvm-8.0.0-x86_64-apple-darwin/"
make check make check
- run:
name: Release
command: |
export PATH="$HOME/.cargo/bin:$PATH"
make release-fast
- run: - run:
name: Integration Tests name: Integration Tests
command: | command: |

View File

@ -104,7 +104,7 @@ test: spectests emtests middleware wasitests circleci-clean test-rest
# Integration tests # Integration tests
integration-tests: release-fast integration-tests: release-clif
echo "Running Integration Tests" echo "Running Integration Tests"
./integration_tests/lua/test.sh ./integration_tests/lua/test.sh
./integration_tests/nginx/test.sh ./integration_tests/nginx/test.sh
@ -130,7 +130,7 @@ release:
cargo build --release --features backend-singlepass,backend-llvm,loader-kernel cargo build --release --features backend-singlepass,backend-llvm,loader-kernel
# Only one backend (cranelift) # Only one backend (cranelift)
release-fast: release-clif:
# If you are in OS-X, you will need mingw-w64 for cross compiling to windows # If you are in OS-X, you will need mingw-w64 for cross compiling to windows
# brew install mingw-w64 # brew install mingw-w64
cargo build --release cargo build --release

View File

@ -29,10 +29,13 @@ Install Wasmer with:
curl https://get.wasmer.io -sSfL | sh curl https://get.wasmer.io -sSfL | sh
``` ```
> Note: *Wasmer is also available on Windows. Download the [`WasmerInstaller.exe` from the Github Releases](https://github.com/wasmerio/wasmer/releases) page.*
Wasmer runtime can also be embedded in different languages, so you can use WebAssembly anywhere ✨: Wasmer runtime can also be embedded in different languages, so you can use WebAssembly anywhere ✨:
* [🦀 **Rust**](https://github.com/wasmerio/wasmer-rust-example) * [**🦀 Rust**](https://github.com/wasmerio/wasmer-rust-example)
* [**C/C++**](https://github.com/wasmerio/wasmer-c-api) * [**🔗 C/C++**](https://github.com/wasmerio/wasmer-c-api)
* [**#️⃣ C#**](https://github.com/migueldeicaza/WasmerSharp)
* [**🐘 PHP**](https://github.com/wasmerio/php-ext-wasm) * [**🐘 PHP**](https://github.com/wasmerio/php-ext-wasm)
* [**🐍 Python**](https://github.com/wasmerio/python-ext-wasm) * [**🐍 Python**](https://github.com/wasmerio/python-ext-wasm)
* [**💎 Ruby**](https://github.com/wasmerio/ruby-ext-wasm) * [**💎 Ruby**](https://github.com/wasmerio/ruby-ext-wasm)
@ -82,7 +85,7 @@ Wasmer is structured into different directories:
Building Wasmer requires [rustup](https://rustup.rs/). Building Wasmer requires [rustup](https://rustup.rs/).
To build on Windows, download and run [`rustup-init.exe`](https://win.rustup.rs/) To build Wasmer on Windows, download and run [`rustup-init.exe`](https://win.rustup.rs/)
then follow the onscreen instructions. then follow the onscreen instructions.
To build on other systems, run: To build on other systems, run:
@ -146,8 +149,8 @@ pkg install cmake
#### Windows (MSVC) #### Windows (MSVC)
Windows support is _highly experimental_. Only simple Wasm programs may be run, and no syscalls are allowed. This means Windows support is _experimental_. WASI is fully supported, but Emscripten support is on the works (this means
nginx and Lua do not work on Windows. See [this issue](https://github.com/wasmerio/wasmer/issues/176) regarding Emscripten syscall polyfills for Windows. nginx and Lua do not work on Windows - you can track the progress on [this issue](https://github.com/wasmerio/wasmer/issues/176)).
1. Install [Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) 1. Install [Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15)
@ -181,8 +184,14 @@ git clone https://github.com/wasmerio/wasmer.git
cd wasmer cd wasmer
# install tools # install tools
# make sure that `python` is accessible. make release-clif # To build with cranelift (default)
make install
make release-llvm # To build with llvm support
make release-singlepass # To build with singlepass support
# or
make release # To build with singlepass, cranelift and llvm support
``` ```
## Testing ## Testing
@ -240,7 +249,7 @@ Below are some of the goals of this project (in order of priority):
## Architecture ## Architecture
If you would like to know how Wasmer works under the hood, please see [ARCHITECTURE.md](./ARCHITECTURE.md). If you would like to know how Wasmer works under the hood, please see [docs/architecture.md](./docs/architecture.md).
## License ## License

View File

@ -134,14 +134,13 @@ mod tests {
use super::*; use super::*;
use wabt::wat2wasm; use wabt::wat2wasm;
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
use wasmer_runtime_core::{backend::Compiler, compile_with, imports, Func}; use wasmer_runtime_core::{backend::Compiler, compile_with, imports, Func};
#[cfg(feature = "llvm")] #[cfg(feature = "llvm")]
fn get_compiler(limit: u64) -> impl Compiler { fn get_compiler(limit: u64) -> impl Compiler {
use wasmer_llvm_backend::code::LLVMModuleCodeGenerator; use wasmer_llvm_backend::ModuleCodeGenerator as LLVMMCG;
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler}; let c: StreamingCompiler<LLVMMCG, _, _, _, _> = StreamingCompiler::new(move || {
let c: StreamingCompiler<LLVMModuleCodeGenerator, _, _, _, _> =
StreamingCompiler::new(move || {
let mut chain = MiddlewareChain::new(); let mut chain = MiddlewareChain::new();
chain.push(Metering::new(limit)); chain.push(Metering::new(limit));
chain chain
@ -151,7 +150,6 @@ mod tests {
#[cfg(feature = "singlepass")] #[cfg(feature = "singlepass")]
fn get_compiler(limit: u64) -> impl Compiler { fn get_compiler(limit: u64) -> impl Compiler {
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG; use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
let c: StreamingCompiler<SinglePassMCG, _, _, _, _> = StreamingCompiler::new(move || { let c: StreamingCompiler<SinglePassMCG, _, _, _, _> = StreamingCompiler::new(move || {
let mut chain = MiddlewareChain::new(); let mut chain = MiddlewareChain::new();

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 958 KiB

After

Width:  |  Height:  |  Size: 958 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -9,9 +9,9 @@ OutputDir=.\
DisableProgramGroupPage=yes DisableProgramGroupPage=yes
ChangesEnvironment=yes ChangesEnvironment=yes
OutputBaseFilename=WasmerInstaller OutputBaseFilename=WasmerInstaller
WizardImageFile=..\..\media\wizard_logo_2.bmp WizardImageFile=media\wizard_logo_2.bmp
WizardSmallImageFile=..\..\media\wizard_logo_small.bmp WizardSmallImageFile=media\wizard_logo_small.bmp
SetupIconFile=..\..\media\wizard_logo.ico SetupIconFile=media\wizard_logo.ico
DisableWelcomePage=no DisableWelcomePage=no
[Files] [Files]