feat(docs): Add WAMR to docs

This commit is contained in:
Edoardo Marangoni
2024-06-14 15:13:31 +02:00
parent 59140dffc8
commit 121bf7ae1c
2 changed files with 33 additions and 3 deletions

23
docs/en/wamr.md Normal file
View File

@@ -0,0 +1,23 @@
> [!WARNING]
> The WAMR backend is, as of now, an experimental feature. This document is
> likely to change quickly.
# Introduction
Recent efforts introduced the possibility to use the WAMR interpreter as a
backend in Wasmer. Among other things, this allows Wasmer to be used in iOS!
This document has the objective to document important aspects of this backend.
## About the WAMR backend
1. Direct calls (outside host) to grow memory are [not
supported](https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/doc/memory_tune.md#the-memory-model),
and users are encouraged to use the dedicated opcode (`memory.grow`)
instead.
2. Importing memories and tables is not supported. If used, WAMR will simply
print `doesn't support import memories and tables for now, ignore them` to
standard output.
3. Due to point (2) above, multithreaded programs relying on importing memories
can fail with out-of-bound memory read/write errors.
Notice, again, that the support is experimental: if you happen to incur in
other issues not listed here, please file an issue!

View File

@@ -1,9 +1,9 @@
# `wasmer` [![Build Status](https://github.com/wasmerio/wasmer/workflows/build/badge.svg?style=flat-square)](https://github.com/wasmerio/wasmer/actions?query=workflow%3Abuild) [![Join Wasmer Slack](https://img.shields.io/static/v1?label=Slack&message=join%20chat&color=brighgreen&style=flat-square)](https://slack.wasmer.io) [![MIT License](https://img.shields.io/github/license/wasmerio/wasmer.svg?style=flat-square)](https://github.com/wasmerio/wasmer/blob/main/LICENSE) [![crates.io](https://img.shields.io/crates/v/wasmer.svg)](https://crates.io/crates/wasmer)
[`Wasmer`](https://wasmer.io/) is the most popular
[WebAssembly](https://webassembly.org/) runtime for Rust. It supports
JIT (Just In Time) and AOT (Ahead Of Time) compilation as well as
pluggable compilers suited to your needs.
[WebAssembly](https://webassembly.org/) runtime for Rust. It supports JIT (Just
In Time), AOT (Ahead Of Time) compilation, an experimental interpreter as well
as pluggable compilers suited to your needs.
It's designed to be safe and secure, and runnable in any kind of environment.
@@ -53,6 +53,13 @@ Wasmer is not only fast, but also designed to be *highly customizable*:
compilation-time and runtime performance, useful for development,
* [`wasmer-compiler-llvm`] provides a deeply optimized executable
code with the fastest runtime speed, ideal for production.
* **Pluggable interpreters** (experimental) - [`wamr`], a feature provided by
the `wasmer` crate, provides binding to the interpreter provided by
[`WAMR`](https://github.com/bytecodealliance/wasm-micro-runtime). More
informations about this experimental backend can be found in the [dedicated
documentation](docs/en/wamr.md).
* **Headless mode** — Once a WebAssembly module has been compiled, it
is possible to serialize it in a file for example, and later execute