File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # wasm-wasi-extensions
2
+
3
+ wasm-wasi-extensions is a set of small static libraries
4
+ which aims to help you build a wasm module using
5
+ WAMR's extensions to WASIp1.
6
+ It's expected to be used in combination with WASI-SDK.
7
+
8
+ Currently it contains bindings for the following APIs:
9
+
10
+ * wasi-nn
11
+
12
+ * lib-socket
13
+
14
+ ## Usage
15
+
16
+ ### Preparation
17
+
18
+ Place it somewhere in your ` CMAKE_PREFIX_PATH ` .
19
+
20
+ You may want to automate the process with ` FetchContent ` .
21
+ ```
22
+ set(URL https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-2.4.0/wamr-wasi-extensions-2.4.0.zip)
23
+
24
+ include(FetchContent)
25
+ FetchContent_Declare(
26
+ wamr-wasi-extensions
27
+ DOWNLOAD_EXTRACT_TIMESTAMP TRUE
28
+ URL ${URL}
29
+ )
30
+ FetchContent_MakeAvailable(wamr-wasi-extensions)
31
+ list(APPEND CMAKE_PREFIX_PATH ${wamr-wasi-extensions_SOURCE_DIR})
32
+ ```
33
+
34
+ Now you can use cmake find_package and link it to your application.
35
+ You can find samples in the [ samples] ( samples ) directory.
36
+
37
+ ### wasi-nn
38
+
39
+ ```
40
+ find_package(wamr-wasi-nn REQUIRED)
41
+ target_link_libraries(you-app wamr-wasi-nn)
42
+ ```
43
+
44
+ ### lib-socket
45
+
46
+ ```
47
+ find_package(wamr-wasi-socket REQUIRED)
48
+ target_link_libraries(your-app wamr-wasi-socket)
49
+ ```
You can’t perform that action at this time.
0 commit comments