WebAssembly Micro Runtime (WAMR)
Go to file
Shi Lei b21ea2f10b
Fixed a bug in simple project building when passing "-p profile" as argument to build.sh; add two more 3rd party folders into git.ignore to avoid merge failure (#209)
* add 3rd party folders which are downloaded during building into git ignore configuration file.

Change-Id: I5a5d913b701bcf6889d89706df65a22c366e24af

Co-authored-by: luc <luc@luc-ubuntu19.bj.intel.com>
2020-03-23 12:05:25 +08:00
assembly-script support app framework base library in assemblyscript (#164) 2020-02-13 15:51:22 +08:00
build-scripts re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
core Add a basic sample to show how native runtime invokes wasm apps in WAMR and how wasm apps invoke native functions. (#207) 2020-03-20 16:39:13 +08:00
doc re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
product-mini Sync with internal feature (#204) 2020-03-18 17:49:23 +08:00
samples Fixed a bug in simple project building when passing "-p profile" as argument to build.sh; add two more 3rd party folders into git.ignore to avoid merge failure (#209) 2020-03-23 12:05:25 +08:00
test-tools re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
wamr-compiler Add printingAdd print time for wamrc, fix posix mmap bug time for wamrc, fixed a posix mmap bug. (#206) 2020-03-20 16:06:40 +08:00
wamr-sdk re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
.gitignore Fixed a bug in simple project building when passing "-p profile" as argument to build.sh; add two more 3rd party folders into git.ignore to avoid merge failure (#209) 2020-03-23 12:05:25 +08:00
ATTRIBUTIONS.md re-org bh_definition.c && introduce wamr fast interpreter (#189) 2020-03-07 22:20:38 +08:00
CODE_OF_CONDUCT.md Restore some files and fix minor issues of SGX platform (#144) 2019-11-21 10:30:57 +08:00
CONTRIBUTING.md Restore some files and fix minor issues of SGX platform (#144) 2019-11-21 10:30:57 +08:00
Dockerfile Fix bug of Dockerfile (#183) 2020-02-28 12:19:35 +08:00
LICENSE Remove unused files and update license header of some files (#138) 2019-11-11 20:38:49 -06:00
ORG_CODE_OF_CONDUCT.md Recover files deleted accidentally in last commit (#143) 2019-11-20 21:31:43 +08:00
README.md Add a basic sample to show how native runtime invokes wasm apps in WAMR and how wasm apps invoke native functions. (#207) 2020-03-20 16:39:13 +08:00
SECURITY.md Recover files deleted accidentally in last commit (#143) 2019-11-20 21:31:43 +08:00

WebAssembly Micro Runtime

Build WAMR VM core | Embed WAMR | Export native function | Build WASM applications | Samples

A Bytecode Alliance project

WebAssembly Micro Runtime (WAMR) is a standalone WebAssembly (WASM) runtime with a small footprint. It includes a few parts as below:

  • The "iwasm" VM core, supporting WebAssembly interpreter, ahead of time compilation (AoT) and Just-in-Time compilation (JIT)

  • The application framework and the supporting API's for the WASM applications

  • The dynamic management of the WASM applications

iwasm VM core

key features

Performance and memory usage

The WAMR performance, footprint and memory usage data are available at the performance wiki page.

Supported architectures and platforms

The iwasm supports the following architectures:

  • X86-64, X86-32
  • ARM, THUMB (ARMV7 Cortex-M7 and Cortex-A15 are tested)
  • MIPS
  • XTENSA

Following platforms are supported. Refer to WAMR porting guide for how to port WAMR to a new platform.

Build wamrc AoT compiler

Execute following commands to build wamrc compiler:

cd wamr-compiler
./build_llvm.sh
mkdir build && cd build
cmake ..
make
ln -s {current path}/wamrc /usr/bin/wamrc

Build the mini product

WAMR supports building the iwasm VM core only (no app framework) to the mini product. The WAMR mini product takes the WASM application file name as input and then executes it. For the detailed procedure, see build WAMR VM core and build and run WASM application.

Application framework

By using the iwasm VM core, we are flexible to build different application frameworks for the specific domains, although it would take quite some effort.

The WAMR has offered a comprehensive framework for programming WASM applications for device and IoT usages. The framework supports running multiple applications, that are based on the event driven programming model. Here are the supporting API sets by the WAMR application framework library :

  • Timer, Inter-app communication (request/response and pub/sub), Sensor, Connectivity and data transmission, 2D graphic UI

Browse the folder core/app-framework for how to extend the application framework.

Remote application management

The WAMR application manager supports remote application management from the host environment or the cloud through any physical communications such as TCP, UPD, UART, BLE, etc. Its modular design makes it able to support application management for different managed runtimes.

The tool host_tool communicates to the WAMR app manager for installing/uninstalling the WASM applications on companion chip from the host system. And the IoT App Store Demo shows the conception of remotely managing the device applications from the cloud.

WAMR SDK

Usually there are two tasks for integrating the WAMR into a particular project:

  • Select what WAMR components (vmcore, libc, app-mgr, app-framework components) to be integrated, and get the associated source files added into the project building configuration
  • Generate the APP SDK for developing the WASM apps on the selected libc and framework components

The WAMR SDK tools is helpful to finish the two tasks quickly. It supports menu configuration for selecting WAMR components and builds the WAMR to a SDK package that includes runtime SDK and APP SDK. The runtime SDK is used for building the native application and the APP SDK should be shipped to WASM application developers.

Samples

The WAMR samples integrate the iwasm VM core, application manager and selected application framework components.

  • Basic: Demonstrating how host runtime calls WASM function as well as WASM function calls native function.
  • Simple: The runtime is integrated with most of the WAMR APP libraries, and a few WASM applications are provided for testing the WAMR APP API set. It uses built-in libc and executes apps in interpreter mode by default.
  • littlevgl: Demonstrating the graphic user interface application usage on WAMR. The whole LittlevGL 2D user graphic library and the UI application is built into WASM application. It uses WASI libc and executes apps in AoT mode by default.
  • gui: Moved the LittlevGL library into the runtime and defined a WASM application interface by wrapping the littlevgl API. It uses WASI libc and executes apps in interpreter mode by default.

Releases and acknowledgments

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

See the major features releasing history and contributor names

Roadmap

See the roadmap to understand what major features are planned or under development.

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

License

WAMR uses the same license as LLVM: the Apache 2.0 license with the LLVM exception. See the LICENSE file for details. This license allows you to freely use, modify, distribute and sell your own products based on WAMR. Any contributions you make will be under the same license.

Submit issues and contact the maintainers

Click here to submit. Your feedback is always welcome!

Contact the maintainers: imrt-public@intel.com