Skip to content

Conversation

soburi
Copy link
Owner

@soburi soburi commented Oct 19, 2025

No description provided.

wenyongh and others added 7 commits October 2, 2025 11:27
Add wasm-micro-runtime into west.yml projects.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Signed-off-by: Wenyong Huang <[email protected]>
Add wasm-micro-runtime as zephyr module and add two samples:
a hello world sample to illustrate how to run WASM application with
wasm-micro-runtime (WAMR) runtime engine, and an app manager
sample to illustrate how to start WAMR app manager in device
side which runs on Zephyr OS and then install/uninstall/query
WASM apps from host side.

Signed-off-by: Wenyong Huang <[email protected]>
Signed-off-by: TOKITA Hiroshi <[email protected]>
Add support to run wasm on native_sim.

Signed-off-by: TOKITA Hiroshi <[email protected]>
Copy link

github-actions bot commented Oct 19, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
wasm-micro-runtime 🆕 N/A (Added) bytecodealliance/wasm-micro-runtime@3f4145e N/A

DNM label due to: 1 added project

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +7 to +16
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/sys/util.h>

#include <errno.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include stdio.h before calling printf in wasm blinky host

The host application calls printf several times (e.g. when printing exceptions and timing data), but the file only includes Zephyr headers. With Zephyr’s default build flags implicit function declarations are errors, so this sample will fail to compile because the prototype for printf is missing. Add #include <stdio.h> (or switch to printk) before invoking the C library printing APIs.

Useful? React with 👍 / 👎.

Comment on lines +7 to +10
#include <stdlib.h>
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Missing stdio include in wasm hello world host

This sample also calls printf to report exceptions and timing information without including <stdio.h>. The Zephyr build enables -Werror=implicit-function-declaration, so the compiler rejects these calls. Include <stdio.h> (or use printk) so the host code compiles.

Useful? React with 👍 / 👎.

Comment on lines +165 to +181
elseif((CONFIG_WAMR_BUILD_TARGET STREQUAL "RISCV32_ILP32") OR
((${CONFIG_RISCV}) AND (NOT (${CONFIG_64BIT}))))
zephyr_compile_definitions(
BUILD_TARGET_RISCV32_ILP32
BUILD_TARGET="RISCV32_ILP32"
)
zephyr_library_sources(
${WAMR_DIR}/core/iwasm/common/arch/invokeNative_riscv.S
)
if(${CONFIG_WAMR_AOT})
zephyr_library_sources(
${WAMR_DIR}/core/iwasm/aot/arch/aot_reloc_riscv.c
)
endif()
zephyr_library_sources(
${WAMR_DIR}/core/iwasm/aot/arch/aot_reloc_riscv.c
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Unconditionally compiling RISC-V AOT relocation source

Lines 179‑181 add aot_reloc_riscv.c outside the surrounding RISC‑V and CONFIG_WAMR_AOT guards. As written, every build will try to compile this RISC‑V‑specific relocation file even when building for ARM or when AOT support is disabled, which pulls in architecture‑specific constants and can cause non‑RISC‑V builds to fail. The extra zephyr_library_sources call should be removed or kept inside the RISC‑V/AOT branch.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants