mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-09 13:16:26 +00:00
commit
271253f940
|
@ -2,7 +2,7 @@ WebAssembly Micro Runtime
|
||||||
=========================
|
=========================
|
||||||
WebAssembly Micro Runtime (WAMR) is a standalone WebAssembly (WASM) runtime designed for a small footprint. It includes:
|
WebAssembly Micro Runtime (WAMR) is a standalone WebAssembly (WASM) runtime designed for a small footprint. It includes:
|
||||||
- A WebAssembly (WASM) VM core
|
- A WebAssembly (WASM) VM core
|
||||||
- The supporting APIs for the WASM applications (code is available but compilation depends on the app manager component)
|
- The supporting APIs for the WASM applications
|
||||||
- A mechanism for dynamic management of the WASM application
|
- A mechanism for dynamic management of the WASM application
|
||||||
|
|
||||||
Why should you use a WASM runtime out of your browser? There are a few points where this might be meaningful:
|
Why should you use a WASM runtime out of your browser? There are a few points where this might be meaningful:
|
||||||
|
@ -65,7 +65,7 @@ make
|
||||||
```
|
```
|
||||||
Zephyr
|
Zephyr
|
||||||
-------------------------
|
-------------------------
|
||||||
You need to download the Zephyr source code first and embedded WAMR into it.
|
You need to download the Zephyr source code first and embed WAMR into it.
|
||||||
``` Bash
|
``` Bash
|
||||||
git clone https://github.com/zephyrproject-rtos/zephyr.git
|
git clone https://github.com/zephyrproject-rtos/zephyr.git
|
||||||
cd zephyr/samples/
|
cd zephyr/samples/
|
||||||
|
@ -88,7 +88,7 @@ git clone https://github.com/emscripten-core/emsdk.git
|
||||||
emsdk install latest
|
emsdk install latest
|
||||||
emsdk activate latest
|
emsdk activate latest
|
||||||
```
|
```
|
||||||
add ```./emsdk_env.sh``` into the path to ease future use, or source it every time.
|
source ```./emsdk_env.sh```.
|
||||||
The Emscripten website provides other installation methods beyond Linux.
|
The Emscripten website provides other installation methods beyond Linux.
|
||||||
|
|
||||||
You can write a simple ```test.c``` as the first sample.
|
You can write a simple ```test.c``` as the first sample.
|
||||||
|
@ -149,7 +149,7 @@ WAMR can be built into a standalone executable which takes the WASM application
|
||||||
<img src="./doc/pics/embed.PNG" width="60%" height="60%">
|
<img src="./doc/pics/embed.PNG" width="60%" height="60%">
|
||||||
|
|
||||||
|
|
||||||
A typical WAMR API usage is shown below (some return values checking are ignored):
|
A typical WAMR API usage is shown below (some return value checks are ignored):
|
||||||
``` C
|
``` C
|
||||||
static char global_heap_buf[512 * 1024];
|
static char global_heap_buf[512 * 1024];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user