![]() * Optimize memory initialization handling in AOT loader (#3983) Save memory if the file buffer is always exist before exit. Signed-off-by: Huang Qi <huangqi3@xiaomi.com> * Break aot_create_comp_data into small functions Signed-off-by: Huang Qi <huangqi3@xiaomi.com> * Handle a new scenario where an item is both exported and imported. (#3984) * Error message improvement (#4000) Improve error message in the scenario where the runtime was built with ref types disabled but the module uses reference types feature. * Ensure __heap_base and __data_end global indices are validated against import count (#3996) * Fix table index calculations in wasm_loader and wasm_mini_loader (#4004) * Add an example of how to embed WAMR in Zephyr user mode (#3998) * [fuzzing] Use software bound-check during fuzzing (#4003) * Update CMakeLists.txt of fuzzing - enable software bound-check - enable wasi - disable libc builtin and multiple modules * Fix off-by-one error in result offset calculation for function calls * Check whether related table has funcref elem in opcode call_indirect (#3999) * check whether table has funcref elem in call_indirect * check whether table has funcref elem in call_indirect when gc is enabled * Improve stack consistency by ensuring sufficient space for dummy offsets (#4011) One more corner case: if the `frame_offset` increases and becomes equal to the `frame_offset_boundary` after the last assignment within the for loop. * Add documentation regarding security issues and the status of Wasm proposals (#3972) Add documentation regarding security issues and the status of Wasm proposals. * Enable shrunk memory by default and add related configurations (#4008) - Enable shrunk memory by default and add related configurations - Improve error messages for memory access alignment checks - Add documentation for WAMR shrunk memory build option - Update NuttX workflow to disable shrunk memory build option * build(deps): Bump actions/upload-artifact from 4.5.0 to 4.6.0 (#4021) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.5.0...v4.6.0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): Bump github/codeql-action from 3.28.0 to 3.28.1 (#4020) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.0 to 3.28.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v3.28.0...v3.28.1) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refine read leb int wasm loader of fast interpreter (#4017) * .github: Add shared lib builds (#3975) So far, no workflows would attempt to build the shared version of the iwasm library (namely, vmlib). Note that, as opposed to GC_EH_BUILD_OPTIONS and DEFAULT_BUILD_OPTIONS, the actual default options defined by the build system are assumed, for the sake of simplicity and avoiding repeated code. * fixes for compiling on windows (#4026) * Refine getting const offsets in wasm loader of fast-interp (#4012) - Refine const offsets in loader for fast-interp - handle const cell num overflow - Use const array, remove list * Synchronize the GC spec tests to the commit from December 9. 2024. (#4022) - Synchronize the GC spec tests to the commit from December 9. 2024. - Revise the error messages to be consistent with the spec test cases. - bypass gc spec test on the nuttx platform as a workaround * Fix wasm loader check data segment count (#4039) correctly report error when datacount section has non-zero data segment count while the data section is not present * Update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in CI (#4050) - update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in ci * build(deps): Bump github/codeql-action from 3.28.1 to 3.28.5 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.1 to 3.28.5. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v3.28.1...v3.28.5) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): Bump github/codeql-action from 3.28.5 to 3.28.8 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.5 to 3.28.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v3.28.5...v3.28.8) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Use wasm32-wasip1 instead of wasm32-wasi target for rust code (#4057) Rust compiler previously deprecated, and now removed the wasm32-wasi target and replaced it with wasm32-wasip1. This change updates all the occurrences of wasm32-wasi in the context of Rust compilation. covers the wasi-nn/test. * add a validator for aot module (#3995) - Add AOT module validation to ensure memory constraints are met - Enable AOT validator in build configuration and update related source files * Show wasm proposals status during compilation and execution (#3989) - add default build configuration options and enhance message output for WAMR features - Add Wasm proposal status printing functionality * initial * Add versioning support and update CMake configuration * Add versioning information for libraries and executables across multiple platforms * Refactor versioning documentation and adopt semantic versioning guidelines * Remove deprecated version.h file and update versioning documentation * Add version.h and update versioning documentation for embedded platforms * Add workflow to confirm version.h is in sync and integrate it into Android compilation workflow * Cleanup check_version_h workflow by removing unnecessary outputs and permissions * Update memory allocation functions to use allocator user data (#4043) * [fuzzing] execute every exported function (#3959) - Enhance wasm mutator fuzz tests by adding export function execution and random value generation - Use --fuel to limit loop size - Use predefined values and enhance argument logging in execution * In wasm32, fix potential conversion overflow when enlarging 65536 pages (#4064) fix enlarge 65536 pages conversion overflow in wasm32 * fix(aot): ensure value_cmp does not exceed br_count in branch table compilation (#4065) * build(deps): Bump github/codeql-action from 3.28.8 to 3.28.9 (#4074) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v3.28.8...v3.28.9) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Unit test:type matching issue and code redundancy (#4079) * Add a conditional check for the macro __STDC_VERSION__ (#4080) * build_llvm.py: Allow to build xtensa target on non-xtensa host Signed-off-by: Huang Qi <huangqi3@xiaomi.com> * [gc] Subtyping fix (#4075) * fix(build_llvm.py): clean up whitespace and formatting in build script Signed-off-by: Huang Qi <huangqi3@xiaomi.com> * feat: add support for EXTERNREF value type and enable AOT validator in fuzz tests (#4083) * fix(unit-test): libc_builtin_test issues (#4073) - uninitialized buffer pointers (crashes) - match integer constant size with printf specifier Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> * fix(build_llvm_libraries.yml): Correct script path for build_llvm.py Signed-off-by: Huang Qi <huangqi3@xiaomi.com> * fix(aot_emit_aot_file): prevent buffer emission for zero byte_count (#4095) if using a debug building of wamrc to run spec test. there will be: core/iwasm/compilation/aot_emit_aot_file.c:1794:13: runtime error: null pointer passed as argument 2, which is declared to never be null * Cmake improvements (#4076) - Utilizes the standard CMake variable BUILD_SHARED_LIBS to simplify the CMake configuration. - Allows the use of a single library definition for both static and shared library cases, improving maintainability and readability of the CMake configuration. - Install vmlib public header files - Installs the public header files for the vmlib target to the include/iwasm directory. - Install cmake package - Adds the necessary CMake configuration files (iwasmConfig.cmake and iwasmConfigVersion.cmake). - Configures the installation of these files to the appropriate directory (lib/cmake/iwasm). - Ensures compatibility with the same major version. - Improve windows product-mini CMakeLists.txt - Fix missing symbols when linking windows product-mini with shared vmlib - Improve Darwin product-mini CMakeLists.txt --------- Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> * fix: when load aot init expr,no type_idx set. (#4094) Fix an assertion from *gc_object.c line 91* `bh_assert(rtt_type->type_flag == WASM_TYPE_STRUCT;` * prevent data overflow on 32 bit platform for memory.grow * cr suggestions * cr suggestions * format * cr suggestions * feat: use C linkage in aot_comp_option.h for C++ embeding (#4106) Co-authored-by: xiangjia.xj <xiangjia.xj@alibaba-inc.com> * build(deps): Bump actions/upload-artifact from 4.6.0 to 4.6.1 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.6.0...v4.6.1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): Bump github/codeql-action from 3.28.9 to 3.28.10 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.9 to 3.28.10. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v3.28.9...v3.28.10) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestions from code review remove confusing comments. * build(deps): Bump ossf/scorecard-action from 2.4.0 to 2.4.1 Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits]( |
||
---|---|---|
.. | ||
app-samples | ||
platforms | ||
README.md |
Build iwasm
iwasm is the executable binary built with WAMR VMcore supports WASI and command line interface. Refer to how to build wamr vmcore for all the supported CMAKE compilation variables.
If you are building for ARM architecture on a X86 development machine, you can use the CMAKE_TOOLCHAIN_FILE
to set the toolchain file for cross compiling.
cmake .. -DCMAKE_TOOLCHAIN_FILE=$TOOL_CHAIN_FILE \
-DWAMR_BUILD_PLATFORM=linux \
-DWAMR_BUILD_TARGET=ARM
Refer to toolchain sample file wamr-app-framework/samples/simple/profiles/arm-interp/toolchain.cmake
for how to build mini product for ARM target architecture.
If you compile for ESP-IDF, make sure to set the right toolchain file for the chip you're using (e.g. $IDF_PATH/tools/cmake/toolchain-esp32c3.cmake
).
Note that all ESP-IDF toolchain files live under $IDF_PATH/tools/cmake/
.
Linux
First of all please install the dependent packages. Run command below in Ubuntu-22.04:
sudo apt install build-essential cmake g++-multilib libgcc-11-dev lib32gcc-11-dev ccache
Or in Ubuntu-20.04
sudo apt install build-essential cmake g++-multilib libgcc-9-dev lib32gcc-9-dev ccache
Or in Ubuntu-18.04:
sudo apt install build-essential cmake g++-multilib libgcc-8-dev lib32gcc-8-dev ccache
Or in Fedora:
sudo dnf install glibc-devel.i686
After installing dependencies, build the source code:
cd product-mini/platforms/linux/
mkdir build && cd build
cmake ..
make
# iwasm is generated under current directory
By default in Linux, the fast interpreter
, AOT
and Libc WASI
are enabled, and JIT is disabled.
And the build target is set to X86_64 or X86_32 depending on the platform's bitwidth.
There are total 6 running modes supported: fast interpreter, classi interpreter, AOT, LLVM JIT, Fast JIT and Multi-tier JIT.
(1) To run a wasm file with fast interpreter
mode - build iwasm with default build and then:
iwasm <wasm file>
Or
mkdir build && cd build
cmake .. -DWAMR_BUILD_INTERP=1
make
(2) To disable fast interpreter
and enable classic interpreter
instead:
mkdir build && cd build
cmake .. -DWAMR_BUILD_FAST_INTERP=0
make
(3) To run an AOT file, firstly please refer to Build wamrc AOT compiler to build wamrc, and then:
wamrc -o <AOT file> <WASM file>
iwasm <AOT file>
(4) To enable the LLVM JIT
mode, firstly we should build the LLVM library:
cd product-mini/platforms/linux/
./build_llvm.sh (The llvm source code is cloned under <wamr_root_dir>/core/deps/llvm and auto built)
Then pass argument -DWAMR_BUILD_JIT=1
to cmake to enable LLVM JIT:
mkdir build && cd build
cmake .. -DWAMR_BUILD_JIT=1
make
Note: By default, the LLVM Orc JIT with Lazy compilation is enabled to speedup the launching process and reduce the JIT compilation time by creating backend threads to compile the WASM functions parallelly, and for the main thread, the functions in the module will not be compiled until they are firstly called and haven't been compiled by the compilation threads.
If developer wants to disable the Lazy compilation, we can:
mkdir build && cd build
cmake .. -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0
make
In which all the WASM functions will be previously compiled before main thread starts to run the wasm module.
(5) To enable the Fast JIT
mode:
mkdir build && cd build
cmake .. -DWAMR_BUILD_FAST_JIT=1
make
The Fast JIT is a lightweight JIT engine with quick startup, small footprint and good portability, and gains ~50% performance of AOT.
(6) To enable the Multi-tier JIT
mode:
mkdir build && cd build
cmake .. -DWAMR_BUILD_FAST_JTI=1 -DWAMR_BUILD_JIT=1
make
The Multi-tier JIT is a two level JIT tier-up engine, which launches Fast JIT to run the wasm module as soon as possible and creates backend threads to compile the LLVM JIT functions at the same time, and when the LLVM JIT functions are compiled, the runtime will switch the extecution from the Fast JIT jitted code to LLVM JIT jitted code gradually, so as to gain the best performance.
Linux SGX (Intel Software Guard Extension)
Please see Build and Port WAMR vmcore for Linux SGX for the details.
MacOS
Make sure to install Xcode from App Store firstly, and install cmake.
If you use Homebrew, install cmake from the command line:
brew install cmake
Then build the source codes:
cd product-mini/platforms/darwin/
mkdir build
cd build
cmake ..
make
# iwasm is generated under current directory
By default in MacOS, the fast interpreter
, AOT
and Libc WASI
are enabled, and JIT is disabled.
And the build target is set to X86_64 or X86_32 depending on the platform's bitwidth.
To run a wasm file with interpreter mode:
iwasm <wasm file>
To run an AOT file, firstly please refer to Build wamrc AOT compiler to build wamrc, and then:
wamrc -o <AOT file> <WASM file>
iwasm <AOT file>
Note:
For how to build the JIT
mode and classic interpreter
mode, please refer to Build iwasm on Linux.
WAMR provides some features which can be easily configured by passing options to cmake, please see WAMR vmcore cmake building configurations for details. Currently in MacOS, interpreter, AOT, and builtin libc are enabled by default.
Windows
Make sure MSVC
and cmake
are installed and available in the command line environment
Then build the source codes:
cd product-mini/platforms/windows/
mkdir build
cd build
cmake ..
cmake --build . --config Release
# ./Release/iwasm.exe is generated
By default in Windows, the fast interpreter
, AOT
and Libc WASI
are enabled, and JIT is disabled.
To run a wasm file with interpreter mode:
iwasm.exe <wasm file>
To run an AOT file, firstly please refer to Build wamrc AOT compiler to build wamrc, and then:
wamrc.exe -o <AOT file> <WASM file>
iwasm.exe <AOT file>
Note:
For how to build the JIT
mode and classic interpreter
mode, please refer to Build iwasm on Linux.
WAMR provides some features which can be easily configured by passing options to cmake, please see WAMR vmcore cmake building configurations for details. Currently in Windows, interpreter, AOT, and builtin libc are enabled by default.
MinGW
First make sure the correct CMake package is installed; the following commands are valid for the MSYS2 build environment:
pacman -R cmake
pacman -S mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-gcc
pacman -S make git
Then follow the build instructions for Windows above, and add the following arguments for cmake:
cmake .. -G"Unix Makefiles" \
-DWAMR_DISABLE_HW_BOUND_CHECK=1
Note that WASI will be disabled until further work is done towards full MinGW support.
- Since memory access boundary check with hardware trap feature is disabled, when generating the AOT file with
wamrc
, the--bounds-checks=1
flag should be added to generate the memory access boundary check instructions to ensure the sandbox security:
wamrc --bounds-checks=1 -o <aot_file> <wasm_file>
- Compiler complaining about missing
UnwindInfoAddress
field inRUNTIME_FUNCTION
struct (winnt.h).
VxWorks
VxWorks 7 SR0620 release is validated.
First you need to build a VSB. Make sure UTILS_UNIX layer is added in the VSB. After the VSB is built, export the VxWorks toolchain path by:
export <vsb_dir_path>/host/vx-compiler/bin:$PATH
Now switch to iwasm source tree to build the source code:
cd product-mini/platforms/vxworks/
mkdir build
cd build
cmake ..
make
Create a VIP based on the VSB. Make sure the following components are added:
- INCLUDE_POSIX_PTHREADS
- INCLUDE_POSIX_PTHREAD_SCHEDULER
- INCLUDE_SHARED_DATA
- INCLUDE_SHL
Copy the generated iwasm executable, the test WASM binary as well as the needed shared libraries (libc.so.1, libllvm.so.1 or libgnu.so.1 depending on the VSB, libunix.so.1) to a supported file system (eg: romfs).
Note: WAMR provides some features which can be easily configured by passing options to cmake, please see WAMR vmcore cmake building configurations for details. Currently in VxWorks, interpreter and builtin libc are enabled by default.
Zephyr
Please refer to this README under the Zephyr sample directory for details.
Note: WAMR provides some features which can be easily configured by passing options to cmake, please see WAMR vmcore cmake building configurations for details. Currently in Zephyr, interpreter, AOT and builtin libc are enabled by default.
RT-Thread
-
Get rt-thread system codes.
-
Enable WAMR software package with menuconfig tool which provided by RT-Thread.
- Environment in Linux, run command below:
scons --menuconfig
- Environment in Windows ConEmu, run command below:
menuconfig
Select and enable
WAMR
in:- RT-Thread online packages
- tools packages
- WebAssembly Micro Runtime (WAMR)
- tools packages
-
Configure
WAMR
with menuconfig tool.you can choice features of iwasm below:
- Enable testing parameters of iwasm
- Enable interpreter Mode / Fast interpreter Mode
- Use built-libc
- Enable AOT
-
Exit menuconfig tool and save configure, update and download package.
pkgs --update
-
build project and download the binary to boards.
scons
or build project with 8-thread by using command below:
scons -j8
after project building, you can got an binary file named
rtthread.bin
, then you can download this file to the MCU board.
Android
Able to generate a shared library support Android platform.
- need an android SDK. Go and get the "Command line tools only"
- look for a command named sdkmanager and download below components. version numbers might need to check and pick others
- "build-tools;29.0.3"
- "cmake;3.10.2.4988404"
- "ndk;latest"
- "patcher;v4"
- "platform-tools"
- "platforms;android-29"
- add bin/ of the downloaded cmake to $PATH
- export ANDROID_HOME=/the/path/of/downloaded/sdk/
- export ANDROID_NDK_LATEST_HOME=/the/path/of/downloaded/sdk/ndk/2x.xxx/
- ready to go
Use such commands, you are able to compile with default configurations.
$ cd product-mini/platforms/android/
$ mkdir build
$ cd build
$ cmake ..
$ make
$ # check output in distribution/wasm
$ # include/ includes all necessary head files
$ # lib includes libiwasm.so
To change the target architecture and ABI, you can define WAMR_BUILD_TARGET
or ANDROID_ABI
respectively. To build for supported Android ABIs:
$ cmake .. -DWAMR_BUILD_TARGET=X86_32 -DANDROID_ABI=x86 # 32-bit Intel CPU
$ cmake .. -DWAMR_BUILD_TARGET=X86_64 -DANDROID_ABI=x86_64 # 64-bit Intel CPU
$ cmake .. -DWAMR_BUILD_TARGET=ARMV7A -DANDROID_ABI=armeabi-v7a # 32-bit ARM CPU
$ cmake .. -DWAMR_BUILD_TARGET=AARCH64 -DANDROID_ABI=arm64-v8a # 64-bit ARM CPU
NuttX
WAMR is integrated with NuttX, just enable the WAMR in Kconfig option (Application Configuration/Interpreters).
ESP-IDF
WAMR integrates with ESP-IDF both for the XTENSA and RISC-V chips (esp32x and esp32c3 respectively).
In order to use this, you need at least version 4.3.1 of ESP-IDF.
If you don't have it installed, follow the instructions here.
ESP-IDF also installs the toolchains needed for compiling WAMR and ESP-IDF.
A small demonstration of how to use WAMR and ESP-IDF can be found under product_mini.
The demo builds WAMR for ESP-IDF and runs a small wasm program.
In order to run it for your specific Espressif chip, edit the build_and_run.sh file and put the correct toolchain file (see #Cross-compilation) and IDF_TARGET
.
Before compiling it is also necessary to call ESP-IDF's export.sh
script to bring all compile time relevant information in scope.
Docker
Docker will download all the dependencies and build WAMR Core on your behalf.
Make sure you have Docker installed on your machine: macOS, Windows or Linux.
Build iwasm with the Docker image:
$ cd ci
$ ./build_wamr.sh
$ ls ../build_out/
build_wamr.sh will generate linux compatible libraries ( libiwasm.so and libvmlib.a ) and an executable binary (iwasm) and copy iwasm to build_out. All original generated files are still under product-mini/platforms/linux/build.
FreeBSD
First, install the dependent packages:
sudo pkg install gcc cmake wget
Then you can run the following commands to build iwasm with default configurations:
cd product-mini/platforms/freebsd
mkdir build && cd build
cmake ..
make
AliOS-Things
-
a developerkit board id needed for testing
-
download the AliOS-Things code
git clone https://github.com/alibaba/AliOS-Things.git
-
copy <wamr_root_dir>/product-mini/platforms/alios-things directory to AliOS-Things/middleware, and rename it as iwasm
cp -a <wamr_root_dir>/product-mini/platforms/alios-things middleware/iwasm
-
create a link to <wamr_root_dir> in middleware/iwasm/ and rename it to wamr
ln -s <wamr_root_dir> middleware/iwasm/wamr
-
modify file app/example/helloworld/helloworld.c, patch as:
#include <stdbool.h> #include <aos/kernel.h> extern bool iwasm_init(); int application_start(int argc, char *argv[]) { int count = 0; iwasm_init(); ... }
-
modify file app/example/helloworld/aos.mk
$(NAME)_COMPONENTS := osal_aos iwasm
-
build source code and run For linux host:
aos make helloworld@linuxhost -c config aos make ./out/helloworld@linuxhost/binary/helloworld@linuxhost.elf
For developerkit: Modify file middleware/iwasm/aos.mk, patch as:
WAMR_BUILD_TARGET := THUMBV7M
aos make helloworld@developerkit -c config aos make
download the binary to developerkit board, check the output from serial port
Cosmopolitan Libc
Currently, only x86_64 architecture with interpreter modes is supported.
Setup cosmocc
as described in Getting Started being sure to get its bin
directory into PATH
.
Build iwasm
export CC=x86_64-unknown-cosmo-cc
export CXX=x86_64-unknown-cosmo-c++
rm -rf build
mkdir build
cmake -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=1 -B build
cmake --build build -j
Run like
./build/iwasm.com <wasm file>