Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-organized the readme #111

Merged
merged 6 commits into from
Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more changes
  • Loading branch information
xwang98 committed Sep 7, 2019
commit f022df316045d865878d5803238a0e326529aeb5
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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 with small footprint. It includes a few parts as below:
- A WebAssembly VM core (namely iwasm)
- The supporting API's for the WASM applications
- A mechanism for dynamic management of the WASM application
Expand All @@ -9,9 +9,9 @@ WebAssembly Micro Runtime (WAMR) is a standalone WebAssembly (WASM) runtime desi
Current Features of WAMR
=========================
- WASM interpreter (AOT is planned)
- Provides support for a subset of Libc.
- Supports for a subset of Libc.
- Supports "SIDE_MODULE=1" EMCC compilation option
- Provides API's for embedding runtime into production software
- Provides embedding C API
- Provides a mechanism for exporting native API's to WASM applications
- Supports the programming of firmware apps in a large range of languages (C/C++/Java/Rust/Go/TypeScript etc.)
- App sandbox execution environment on embedded OS
Expand All @@ -25,38 +25,39 @@ Application framework architecture

By using the iwasm VM core, we are flexible to build different application frameworks for the specific domains.

The WAMR has offered an comprehensive application framework for IoT device usages. The framework solves many common requirements for building a real project:
- Modular design for multiple runtimes support
The WAMR has offered a comprehensive application framework for device and IoT usages. The framework solves many common requirements for building a real project:
- Modular design for more language runtimes support
- Inter application communication
- Remote application management
- WASM APP programming model and API extension mechanism

<img src="./doc/pics/wamr-arch.JPG" width="80%" height="80%">
<img src="./doc/pics/wamr-arch.JPG" width="80%">



Build WAMR Core and run WASM applications
================================================

Please follow the instructions below to build the WAMR core (iwasm) on different platforms:
WAMR VM core (iwasm) can support building on different platforms:
- Linux
- Zephyr
- Mac
- VxWorks
- AliOS-Things
- Docker
- Intel Software Guard Extention (SGX)

Then you can build some basic WASM applications and run it with the WAMR core. As the WAMR core doesn't include the extended application library, your WASM applications can only use the built-in APIs supported by WAMR.
After building the iwasm, we can compile some basic WASM applications and run it from the WAMR core. As the WAMR core doesn't include the extended application library, your WASM applications can only use the [WAMR built-in APIs](./doc/wamr_api.md).

See the [doc/building.md](./doc/building.md) for the details.
See the [doc/building.md](./doc/building.md) for the detailed instructions.


Embed WAMR into software production
=====================================
Embed WAMR
===========

WAMR can be built into a standalone executable which takes the WASM application file name as input, and then executes it. In some other situations, the WAMR source code is embedded the product code and built into the final product.

WAMR provides a set of C API for embedding code to load the WASM module, instantiate the module and invoke a WASM function from a native call.
WAMR provides a set of C API for embedding WAMR code to load the WASM module, instantiate the module and invoke a WASM function from a native call.

See the [doc/embed_wamr.md](./doc/embed_wamr.md) for the details.

Expand All @@ -69,8 +70,7 @@ WAMR defined event driven programming model:


In general there are a few API classes for the WASM application programming:
- Built-in API: WAMR core provides a minimal libc API set for WASM APP
- 3rd party libraries: Programmers can download any 3rd party C/C++ source code and build it together with the WASM APP code
- WAMR Built-in API: WAMR core provides a minimal libc API set for WASM APP
- WAMR application libraries:
- Timer
- Micro service (Request/Response)
Expand All @@ -79,6 +79,7 @@ In general there are a few API classes for the WASM application programming:
- Connection and data transmission
- 2D graphic UI (based on littlevgl)
- User extended native API: extend the native API to the WASM applications
- 3rd party libraries: Programmers can download any 3rd party C/C++ source code and build it together with the WASM APP code

See the [doc/wamr_api.md](./doc/wamr_api.md) for the details.

Expand All @@ -93,16 +94,29 @@ The WAMR samples are located in folder [./samples](./samples). A sample usually
- [IoT-APP-Store-Demo](./test-tools/IoT-APP-Store-Demo/README.md): A web site for demostrating a WASM APP store usage where we can remotely install and uninstall WASM application on remote devices.


The graphic user interface sample:
The graphic user interface demo photo:

![WAMR samples diagram](./doc/pics/vgl_demo.png "WAMR samples diagram")




Releases, acknowledgment and roadmap
====================================
Releases and acknowledgment
===========================

WAMR is a community efforts. Since Intel Corp contributed the first release of this project, this project received many good contributions from the community.

See the [major features releasing history and contributor names](./doc/release_ack.md)


Roadmap
=======

See the [roadmap](./doc/roadmap.md) to understand what major features are planed or under development.

Please submit issues for any new feature request, or your plan for contributing new features.



Submit issues and contact the maintainers
=========================================
Expand Down
Binary file added doc/pics/vgl_demo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added doc/release_ack.md
Empty file.
14 changes: 14 additions & 0 deletions doc/roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

## Ahead of time compilation


## WASI support


## Data serialization


## Threading


##
8 changes: 1 addition & 7 deletions doc/wamr_api.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@

WASM application library
========================
In general, there are 3 classes of API's important for the WASM application:
- Built-in API's: WAMR provides a minimal API set for developers.
- 3rd party API's: Programmer can download and include any 3rd party C source code and add it into their own WASM app source tree.
- Platform native API's: WAMR provides a mechanism to export a native API to the WASM application.

WAMR APP API includes built-in Libc API's, Base library and Extension library reference.

Built-in application library
---------------
Built-in API's include Libc API's, Base library and Extension library reference.

**Libc API's**<br/>
This is a minimal set of Libc API's for memory allocation, string manipulation and printing. The header file is located at ```lib/app-libs/libc/lib_base.h```. The current supported API set is listed here:
Expand Down
12 changes: 7 additions & 5 deletions samples/gui/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Introduction
==============
This sample demonstrates that a graphic user interface application in WebAssembly programming with WAMR graphic library(WGL) extension. WGL is implemented based on LittlevGL, an open-source embedded 2d graphic library. LittlevGL source code is built into the WAMR runtime and exported to Webassembly application with WGL extension. These extension API's are listed in: `<wamr_root>/core/iwasm/lib/app-libs/extension/gui/wgl.h`. Currently only a small set of API's are provided and that would be extended in future.
This sample demonstrates that a graphic user interface application in WebAssembly programming with WAMR graphic library(WGL) extension. WGL defined a WASM application API set for programming the UI applications.

WGL implemention is based on [LittlevGL](https://github.com/littlevgl/), an open-source embedded 2d graphic library. Comparing the building the LittlevGL into WASM bytecode in the [littlevgl](../littlevgl) sample, WGL compiled LittlevGL source code into the WAMR runtime and defined a wrapper API for exporting to Webassembly application. These extension API's are listed in: `<wamr_root>/core/iwasm/lib/app-libs/extension/gui/wgl.h`. Currently only a small set of API's are provided and that would be extended in future.


The runtime component supports building target for Linux and Zephyr/STM Nucleo board. The beauty of this sample is the WebAssembly application can have identical display and behavior when running from both runtime environments. That implies we can do majority of application validation from desktop environment as long as two runtime distributions support the same set of application interface.

The sample also provides the native Linux version of application without the runtime under folder "lvgl-native-ui-app". It can help to check differences between the implementations in native and WebAssembly.

<img src="../../doc/pics/vgl_linux.PNG">
Below pictures show the WASM application is running on an STM board with an LCD touch panel. When users click the blue button, the WASM application increases the counter, and the latest counter value is displayed on the top banner of the touch panel. The number on top will plus one each second, and the number on the bottom will plus one when clicked.


The number on top will plus one each second, and the number on the bottom will plus one when clicked.
![WAMR UI SAMPLE](../../doc/pics/vgl_demo2.png "WAMR UI DEMO")

Configure 32 bit or 64 bit build
==============
Expand Down
16 changes: 12 additions & 4 deletions samples/littlevgl/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Introduction
==============
This sample demonstrates that a graphic user interface application in WebAssembly integrates the LittlevGL, an open-source embedded 2d graphic library.
This sample demonstrates that a graphic user interface application in WebAssembly by compiling the LittlevGL, an open-source embedded 2d graphic library into the WASM bytecode.

In this sample, the whole LittlevGL source code is built into the WebAssembly code with the user application. The platform interfaces defined by LittlevGL is implemented in the runtime and exported to the application through the declarations from source "ext_lib_export.c" as below:

Expand All @@ -14,12 +14,20 @@ In this sample, the whole LittlevGL source code is built into the WebAssembly co

The runtime component supports building target for Linux and Zephyr/STM Nucleo board. The beauty of this sample is the WebAssembly application can have identical display and behavior when running from both runtime environments. That implies we can do majority of application validation from desktop environment as long as two runtime distributions support the same set of application interface.


Below pictures show the WASM application is running on an STM board with an LCD touch panel.

![WAMR UI SAMPLE](../../doc/pics/vgl_demo2.png "WAMR UI DEMO STM32")

![WAMR UI SAMPLE](../../doc/pics/vgl_demo_linux.png "WAMR UI DEMO LINUX")


The number on top will plus one each second, and the number on the bottom will plus one when clicked. When users click the blue button, the WASM application increases the counter, and the latest counter value is displayed on the top banner of the touch panel.

The sample also provides the native Linux version of application without the runtime under folder "vgl-native-ui-app". It can help to check differences between the implementations in native and WebAssembly.


<img src="../../doc/pics/vgl_linux.PNG">

The number on top will plus one each second, and the number on the bottom will plus one when clicked.


Configure 32 bit or 64 bit build
==============
Expand Down