Merge pull request #106 from wasmerio/feature/improved-docs

Improved docs, adding repo structure and libraries README
This commit is contained in:
Syrus Akbary 2019-01-22 16:08:18 -05:00 committed by GitHub
commit ee67bf95db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 3 deletions

View File

@ -20,12 +20,23 @@ curl https://get.wasmer.io -sSfL | sh
`wasmer` can execute both the standard binary format (`.wasm`) and the text
format defined by the WebAssembly reference interpreter (`.wat`).
Once installed, you will be able to run any wasm module (_including Nginx!_):
Once installed, you will be able to run any WebAssembly files (_including Nginx, and Lua!_):
```sh
# Run Lua
wasmer run examples/lua.wasm
# Run Nginx
wasmer run examples/nginx/nginx.wasm -- -p examples/nginx -c nginx.conf
```
## Code Structure
Wasmer is structured into different directories:
- [`src`](./src): code related to the wasmer excutable binary itself
- [`lib`](./lib): modularized libraries that Wasmer uses under the hood
## Building & Running
To build this project you will need Rust and Cargo.
@ -63,7 +74,6 @@ You can also run integration tests with:
make integration-tests
```
## Roadmap
Wasmer is an open project guided by strong principles, aiming to be modular, flexible and fast. It is open to the community to help set its direction.
@ -74,7 +84,7 @@ Below are some of the goals (written with order) of this project:
- [x] It should be fast _(partially achieved)_
- [ ] Support Emscripten calls _(on the works)_
- [ ] Support Rust ABI calls
- [ ] Support GO ABI calls
## Architecture

36
lib/README.md Normal file
View File

@ -0,0 +1,36 @@
# Wasmer Libraries
Wasmer is modularized into different libraries, separated into three main sections:
- [Runtime](#Runtime)
- [Integrations](#Integrations)
- [Backends](#Backends)
## Runtime
The core of Wasmer is the runtime, which provides the necessary
abstractions to create a good user-experience when embedding.
The runtime is divided into two main libraries:
- [runtime-core](./runtime-core/): The main implementation of the runtime.
- [runtime](./runtime/): Easy-to-use api on top of runtime-core.
## Integrations
The intergration run on-top of the Wasmer runtime and allow us to run WebAssembly files compiled for different environments.
Wasmer intends to support different integrations:
- [emscripten](./emscripten): run emscripten-generated WebAssembly files, such as [Lua](../examples/lua.wasm) or [Nginx](../examples/nginx/nginx.wasm).
- Go ABI: _we will work on this soon! Want to give us a hand? ✋_
- Blazor: _researching period, see [tracking issue](https://github.com/wasmerio/wasmer/issues/97)_
## Backends
The Wasmer [runtime](./runtime) is designed to support multiple compiler backends, allowing the user
to tune the codegen properties (compile speed, performance, etc) to fit your usecase best.
Currently, we support a Cranelift compiler backend:
- [clif-backend](./clif-backend/): The integration of Wasmer with Cranelift