Build WasmEdge With WasmEdge-Image Plug-in
Prerequisites
The prerequisites of the WasmEdge-Image plug-in is the same as the WasmEdge building environment on the Linux platforms or MacOS platforms.
If developers build with their own environment, please ensure the zlib
are installed.
sudo apt update
sudo apt install zlib1g-dev
On MacOS platforms, the libjpeg
and libpng
are required.
brew install jpeg-turbo libpng
Build WasmEdge with WasmEdge-Image Plug-in
To enable the WasmEdge WasmEdge-Image, developers need to building the WasmEdge from source with the cmake option -DWASMEDGE_PLUGIN_IMAGE=On
.
cd <path/to/your/wasmedge/source/folder>
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_PLUGIN_IMAGE=On
cmake --build build
# For the WasmEdge-Image plug-in, you should install this project.
cmake --install build
If the built wasmedge
CLI tool cannot find the WasmEdge-Image plug-in, you can set the WASMEDGE_PLUGIN_PATH
environment variable to the plug-in installation path (such as /usr/local/lib/wasmedge/
, or the built plug-in path build/plugins/wasmedge_image/
) to try to fix this issue.
Then you will have an executable wasmedge
runtime under /usr/local/bin
and the WasmEdge-Image plug-in under /usr/local/lib/wasmedge/libwasmedgePluginWasmEdgeImage.so
after installation.