Skip to content

[BUG] Documentation - build system misalignment #4913

@kr-t

Description

@kr-t

Is it a security vulnerability?
No

Describe the bug
Documentation states, that when WASM Interpreter is on, the fast one shall be the default one:
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/doc/build_wamr.md#configure-interpreters

Nevertheless, while it's true for the Linux/Posix platforms (here:


and here:
set (WAMR_BUILD_FAST_INTERP 1)

It isn't true, when build for Zephyr (and maybe other platforms): since WAMR_BUILD_FAST_INTERP is neither explicitly set here for example:
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/product-mini/platforms/zephyr/simple/CMakeLists.txt
nor here:
https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/build-scripts/runtime_lib.cmake

It seems to default to classic interpreter, probably here, but I'm not sure:

set (INTERPRETER "wasm_interp_classic.c")

Version
main: 10c36f4

To Reproduce
Steps to reproduce the behavior:

  1. Compile iwasm for Linux, get following:
cmake ..
-- WAMR version: 2.4.3
-- Build Configurations:
     Build as target X86_64
     Build for platform linux
     ...
     WAMR Interpreter enabled
     Fast interpreter enabled
  1. Compile for Zephyr, get following (from: https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/product-mini/platforms/zephyr/simple/README.md)
west build . -b qemu_cortex_a53 -p always -- -DWAMR_BUILD_TARGET=AARCH64 
...
-- WAMR version: 2.4.3
-- Build Configurations:
     Build as target AARCH64
     Build for platform zephyr
     ...
     WAMR Interpreter enabled
     Fast interpreter disabled

Desktop (please complete the following information):

  • Arch: x86_64
  • Board: native x86 and qemu_cortex_a53
  • OS: Ubuntu WSL
  • Version 24

Additional context
If this isn't intended I would gladly submit a PR fixing this, just wanted to have a confirmation before starting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions