mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 09:25:20 +00:00
![]() * Add Windows support for C-API and Runtime API libraries and examples. Signed-off-by: Wu Zhongmin <vwzm@live.com> Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Address the review comments Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Rewrite the the bh_getopt to make it avaliable for more kinds of options Signed-off-by: Wu Zhongmin <vwzm@live.com> Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Add the license header Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> Co-authored-by: Zhongmin Wu <vwzm@live.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
README.md |
WAMR supports wasm-c-api in both interpreter mode and aot mode. By default, all samples are compiled and run in "interpreter" mode.
$ mkdir build
$ cd build
$ cmake ..
$ make
$ # it will build a library with c-api supporting.
$ # Also copy *.wasm from ../src/
$ # and generate executable files
$ # now, it is ok to run samples
$ ./hello
$ ...
$ ./global
$ ...
$ ./callback
$ ...
They can be compiled and run in aot mode when some compiling flags are given.
$ mkdir build
$ cd build
$ cmake -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_AOT=1 ..
$ make
$ # it will build a library with c-api supporting.
$ # Also copy *.wasm from ../src/
$ # and transform *.wasm to *.aot
$ # and generate executable files
$ # now, it is ok to run samples
$ ./hello
$ ...
$ ./global
$ ...
$ ./callback
$ ...