You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contribute/source/build_from_src.md
+21-21
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,18 @@ Please follow this guide to build and test WasmEdge from the source code.
23
23
WasmEdge provides various tools for enabling different runtime environments for optimal performance. You can find that there are several wasmedge related tools:
24
24
25
25
1.`wasmedge` is the general wasm runtime.
26
-
-`wasmedge` executes a `WASM` file in the interpreter mode or a compiled `WASM` file in the ahead-of-time compilation mode.
27
-
- To disable building all tools, you can set the CMake option `WASMEDGE_BUILD_TOOLS` to `OFF`.
26
+
-`wasmedge` executes a `WASM` file in the interpreter mode or a compiled `WASM` file in the ahead-of-time compilation mode.
27
+
- To disable building all tools, you can set the CMake option `WASMEDGE_BUILD_TOOLS` to `OFF`.
28
28
2.`wasmedgec` is the ahead-of-time `WASM` compiler.
29
-
-`wasmedgec` compiles a general `WASM` file into a compiled `WASM` file.
30
-
- To disable building the ahead-of-time compiler only, you can set the CMake option `WASMEDGE_BUILD_AOT_RUNTIME` to `OFF`.
29
+
-`wasmedgec` compiles a general `WASM` file into a compiled `WASM` file.
30
+
- To disable building the ahead-of-time compiler only, you can set the CMake option `WASMEDGE_BUILD_AOT_RUNTIME` to `OFF`.
31
31
3.`libwasmedge.so` is the WasmEdge C API shared library. (`libwasmedge.dylib` on MacOS and `wasmedge.dll` on Windows)
32
-
-`libwasmedge.so`, `libwasmedge.dylib`, or `wasmedge.dll` provides the C API for the ahead-of-time compiler and the WASM runtime.
33
-
- The APIs related to the ahead-of-time compiler will always fail if the CMake option `WASMEDGE_BUILD_AOT_RUNTIME` is set as `OFF`.
34
-
- To disable building just the shared library, you can set the CMake option `WASMEDGE_BUILD_SHARED_LIB` to `OFF`.
32
+
-`libwasmedge.so`, `libwasmedge.dylib`, or `wasmedge.dll` provides the C API for the ahead-of-time compiler and the WASM runtime.
33
+
- The APIs related to the ahead-of-time compiler will always fail if the CMake option `WASMEDGE_BUILD_AOT_RUNTIME` is set as `OFF`.
34
+
- To disable building just the shared library, you can set the CMake option `WASMEDGE_BUILD_SHARED_LIB` to `OFF`.
35
35
4.`ssvm-qitc` is for AI applications and supports the ONNC runtime for AI models in the ONNX format.
36
-
- If you want to try `ssvm-qitc`, please refer to [ONNC-Wasm](https://github.com/ONNC/onnc-wasm) project to set up the working environment and tryout several examples.
37
-
- And here is our [tutorial for ONNC-Wasm project(YouTube Video)](https://www.youtube.com/watch?v=cbiPuHMS-iQ).
36
+
- If you want to try `ssvm-qitc`, please refer to [ONNC-Wasm](https://github.com/ONNC/onnc-wasm) project to set up the working environment and tryout several examples.
37
+
- And here is our [tutorial for ONNC-Wasm project(YouTube Video)](https://www.youtube.com/watch?v=cbiPuHMS-iQ).
38
38
39
39
## CMake Building Options
40
40
@@ -43,24 +43,24 @@ Developers can set the CMake options to customize the WasmEdge building.
43
43
1.`WASMEDGE_BUILD_TESTS`: build the WasmEdge tests. Default is `OFF`.
44
44
2.`WASMEDGE_BUILD_AOT_RUNTIME`: build with the Ahead-of-Time compiler supporting. Default is `ON`.
45
45
3.`WASMEDGE_BUILD_SHARED_LIB`: build the WasmEdge shared library (`libwasmedge.so`, `libwasmedge.dylib`, or `wasmedge.dll`). Default is `ON`.
46
-
- By default, the WasmEdge shared library will link to the LLVM shared library.
46
+
- By default, the WasmEdge shared library will link to the LLVM shared library.
47
47
4.`WASMEDGE_BUILD_STATIC_LIB`: build the WasmEdge static library (`libwasmedge.a`, Linux and MacOS platforms, experimental). Default is `OFF`.
48
-
- If this option is set as `ON`, the option `WASMEDGE_FORCE_DISABLE_LTO` will forcefully be set as `ON`.
49
-
- If this option is set as `ON`, the `libz` and `libtinfo` on Linux platforms will be statically linked.
50
-
- For linking with `libwasmedge.a`, developers should also add the `-ldl`, `-pthread`, `-lm`, and `-lstdc++` linker options on both Linux and MacOS platforms, and `-lrt` on Linux platforms.
48
+
- If this option is set as `ON`, the option `WASMEDGE_FORCE_DISABLE_LTO` will forcefully be set as `ON`.
49
+
- If this option is set as `ON`, the `libz` and `libtinfo` on Linux platforms will be statically linked.
50
+
- For linking with `libwasmedge.a`, developers should also add the `-ldl`, `-pthread`, `-lm`, and `-lstdc++` linker options on both Linux and MacOS platforms, and `-lrt` on Linux platforms.
51
51
5.`WASMEDGE_BUILD_TOOLS`: build the `wasmedge` and `wasmedgec` tools. Default is `ON`.
52
-
- The `wasmedge` and `wasmedgec` tools will link to the WasmEdge shared library by default.
53
-
- If this option is set as `ON` and `WASMEDGE_BUILD_AOT_RUNTIME` is set as `OFF`, the `wasmedgec` tool for the AOT compiler will not be built.
54
-
- If this option is set as `ON` but the option `WASMEDGE_LINK_TOOLS_STATIC` is set as `OFF`, the option `WASMEDGE_BUILD_SHARED_LIB` will forcefully be set as `ON`.
55
-
- If this option and the option `WASMEDGE_LINK_TOOLS_STATIC` are both set as `ON`, the `WASMEDGE_LINK_LLVM_STATIC` and `WASMEDGE_BUILD_STATIC_LIB` will both be set as `ON`, and the `wasmedge` and `wasmedgec` tools will link to the WasmEdge static library instead. In this case, the plugins will not work in tools.
52
+
- The `wasmedge` and `wasmedgec` tools will link to the WasmEdge shared library by default.
53
+
- If this option is set as `ON` and `WASMEDGE_BUILD_AOT_RUNTIME` is set as `OFF`, the `wasmedgec` tool for the AOT compiler will not be built.
54
+
- If this option is set as `ON` but the option `WASMEDGE_LINK_TOOLS_STATIC` is set as `OFF`, the option `WASMEDGE_BUILD_SHARED_LIB` will forcefully be set as `ON`.
55
+
- If this option and the option `WASMEDGE_LINK_TOOLS_STATIC` are both set as `ON`, the `WASMEDGE_LINK_LLVM_STATIC` and `WASMEDGE_BUILD_STATIC_LIB` will both be set as `ON`, and the `wasmedge` and `wasmedgec` tools will link to the WasmEdge static library instead. In this case, the plugins will not work in tools.
56
56
6.`WASMEDGE_BUILD_PLUGINS`: build the WasmEdge plugins. Default is `ON`.
57
57
7.`WASMEDGE_BUILD_EXAMPLE`: build the WasmEdge examples. Default is `OFF`.
58
58
8.`WASMEDGE_PLUGIN_WASI_NN_BACKEND`: build the WasmEdge WASI-NN plugin (Linux platforms only). Default is empty.
59
-
- This option is useless if the option `WASMEDGE_BUILD_PLUGINS` is set as `OFF`.
60
-
- To build the WASI-NN plugin with backend, please use `-DWASMEDGE_PLUGIN_WASI_NN_BACKEND=<backend_name>`.
61
-
- To build the WASI-NN plugin with multiple backends, please use `-DWASMEDGE_PLUGIN_WASI_NN_BACKEND=<backend_name1>,<backend_name2>`.
59
+
- This option is useless if the option `WASMEDGE_BUILD_PLUGINS` is set as `OFF`.
60
+
- To build the WASI-NN plugin with backend, please use `-DWASMEDGE_PLUGIN_WASI_NN_BACKEND=<backend_name>`.
61
+
- To build the WASI-NN plugin with multiple backends, please use `-DWASMEDGE_PLUGIN_WASI_NN_BACKEND=<backend_name1>,<backend_name2>`.
62
62
9.`WASMEDGE_PLUGIN_WASI_CRYPTO`: build the WasmEdge WASI-Crypto plugin (Linux platforms only). Default is `OFF`.
63
-
- This option is useless if the option `WASMEDGE_BUILD_PLUGINS` is set as `OFF`.
63
+
- This option is useless if the option `WASMEDGE_BUILD_PLUGINS` is set as `OFF`.
64
64
10.`WASMEDGE_FORCE_DISABLE_LTO`: forcefully turn off the link time optimization. Default is `OFF`.
65
65
11.`WASMEDGE_LINK_LLVM_STATIC`: link the LLVM and lld libraries statically (Linux and MacOS platforms only, experimental). Default is `OFF`.
66
66
12.`WASMEDGE_LINK_TOOLS_STATIC`: make the `wasmedge` and `wasmedgec` tools to link the WasmEdge library and LLVM libraries statically (Linux and MacOS platforms only, experimental). Default is `OFF`.
0 commit comments