wasm-micro-runtime/samples/import-func-callback
石博文 3c337dc3ab
fix: Wrong compiler parameter on MSVC (#4778)
* fix: Wrong compiler parameter on MSVC
* refactor: Move gcc flags to common build script.
* refactor: Add both C/CXX flags
2026-01-08 09:10:07 +08:00
..
src Add import functions callback (#4606) 2025-10-09 12:04:29 +08:00
wasm-apps Add import functions callback (#4606) 2025-10-09 12:04:29 +08:00
CMakeLists.txt fix: Wrong compiler parameter on MSVC (#4778) 2026-01-08 09:10:07 +08:00
README.md Add import functions callback (#4606) 2025-10-09 12:04:29 +08:00

"import function callback" sample introduction

This sample demonstrates how to use import function callbacks to handle WebAssembly modules that import external functions. The sample shows how to register callback functions for imported functions and execute them when the WASM module loads these imported functions.

The sample includes a WASM module that imports external functions and a host application that provides callback import_func_type_callback for these imported functions.

Build and run the sample

mkdir build && cd build
cmake ..
cmake --build . --config Release
./import-func-callback