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

View File

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

View File

@ -29,10 +29,13 @@ Install Wasmer with:
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 ✨:
* [🦀 **Rust**](https://github.com/wasmerio/wasmer-rust-example)
* [**C/C++**](https://github.com/wasmerio/wasmer-c-api)
* [**🦀 Rust**](https://github.com/wasmerio/wasmer-rust-example)
* [**🔗 C/C++**](https://github.com/wasmerio/wasmer-c-api)
* [**#️⃣ C#**](https://github.com/migueldeicaza/WasmerSharp)
* [**🐘 PHP**](https://github.com/wasmerio/php-ext-wasm)
* [**🐍 Python**](https://github.com/wasmerio/python-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/).
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.
To build on other systems, run:
@ -146,8 +149,8 @@ pkg install cmake
#### Windows (MSVC)
Windows support is _highly experimental_. Only simple Wasm programs may be run, and no syscalls are allowed. 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.
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 - 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)
@ -181,8 +184,14 @@ git clone https://github.com/wasmerio/wasmer.git
cd wasmer
# install tools
# make sure that `python` is accessible.
make install
make release-clif # To build with cranelift (default)
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
@ -240,7 +249,7 @@ Below are some of the goals of this project (in order of priority):
## 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

View File

@ -134,24 +134,22 @@ mod tests {
use super::*;
use wabt::wat2wasm;
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
use wasmer_runtime_core::{backend::Compiler, compile_with, imports, Func};
#[cfg(feature = "llvm")]
fn get_compiler(limit: u64) -> impl Compiler {
use wasmer_llvm_backend::code::LLVMModuleCodeGenerator;
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
let c: StreamingCompiler<LLVMModuleCodeGenerator, _, _, _, _> =
StreamingCompiler::new(move || {
let mut chain = MiddlewareChain::new();
chain.push(Metering::new(limit));
chain
});
use wasmer_llvm_backend::ModuleCodeGenerator as LLVMMCG;
let c: StreamingCompiler<LLVMMCG, _, _, _, _> = StreamingCompiler::new(move || {
let mut chain = MiddlewareChain::new();
chain.push(Metering::new(limit));
chain
});
c
}
#[cfg(feature = "singlepass")]
fn get_compiler(limit: u64) -> impl Compiler {
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
let c: StreamingCompiler<SinglePassMCG, _, _, _, _> = StreamingCompiler::new(move || {
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
ChangesEnvironment=yes
OutputBaseFilename=WasmerInstaller
WizardImageFile=..\..\media\wizard_logo_2.bmp
WizardSmallImageFile=..\..\media\wizard_logo_small.bmp
SetupIconFile=..\..\media\wizard_logo.ico
WizardImageFile=media\wizard_logo_2.bmp
WizardSmallImageFile=media\wizard_logo_small.bmp
SetupIconFile=media\wizard_logo.ico
DisableWelcomePage=no
[Files]