wasm-micro-runtime/wamr-wasi-extensions
YAMAMOTO Takashi 248e10b79e
nn-cli: add an option to use load_by_name (#4490)
by specifying a name for --load-graph.
for example,
```
--load-graph=name=foo
```
2025-07-17 09:47:20 +08:00
..
nn wamr-wasi-extensions: add a cmake package to provide our wasi extension (#4344) 2025-06-12 09:33:25 +08:00
samples nn-cli: add an option to use load_by_name (#4490) 2025-07-17 09:47:20 +08:00
socket wamr-wasi-extensions/socket: disable reference-types (#4392) 2025-06-20 15:50:48 +08:00
build_libs.sh CI: build wamr-wasi-extensions (#4394) 2025-06-27 12:28:46 +08:00
build_samples.sh CI: build wamr-wasi-extensions (#4394) 2025-06-27 12:28:46 +08:00
CMakeLists.txt wamr-wasi-extensions: add lib-socket things (#4360) 2025-06-17 11:13:43 +08:00
README.md wamr-wasi-extensions: document (#4493) 2025-07-17 09:44:47 +08:00
test.sh CI: build wamr-wasi-extensions (#4394) 2025-06-27 12:28:46 +08:00

wasm-wasi-extensions

wasm-wasi-extensions is a set of small static libraries which aims to help you build a wasm module using WAMR's extensions to WASIp1. It's expected to be used in combination with WASI-SDK.

Currently it contains bindings for the following APIs:

  • wasi-nn

  • lib-socket

Usage

Preparation

Place it somewhere in your CMAKE_PREFIX_PATH.

You may want to automate the process with FetchContent.

set(URL https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-2.4.0/wamr-wasi-extensions-2.4.0.zip)

include(FetchContent)
FetchContent_Declare(
    wamr-wasi-extensions
    DOWNLOAD_EXTRACT_TIMESTAMP TRUE
    URL ${URL}
)
FetchContent_MakeAvailable(wamr-wasi-extensions)
list(APPEND CMAKE_PREFIX_PATH ${wamr-wasi-extensions_SOURCE_DIR})

Now you can use cmake find_package and link it to your application. You can find samples in the samples directory.

wasi-nn

find_package(wamr-wasi-nn REQUIRED)
target_link_libraries(you-app wamr-wasi-nn)

lib-socket

find_package(wamr-wasi-socket REQUIRED)
target_link_libraries(your-app wamr-wasi-socket)