Develop WasmEdge Plug-in
While the WasmEdge language SDKs allow registering host functions from a host (wrapping) application, developers should implement the host functions before compilation. For the other solutions, WasmEdge provides the plug-in architecture to load the plug-in shared library for easier extending of the host functions. With developing the plug-ins, WasmEdge SDKs in the supported languages can load and register the host functions from the plug-in shared libraries.
In current, developers can follow the guides to implement the plug-ins in C API (recommended) or C++.
Loadable Plug-in
Loadable plugin is a standalone .so
/.dylib
/.dll
file that WasmEdge can load during runtime environment, and provide modules to be imported.
Please refer to the plugin example code.
WasmEdge Currently Released Plug-ins
There are several plug-in releases with the WasmEdge official releases. Please check the following table to check the release status and how to build from source with the plug-ins.
The
WasmEdge-Process
plug-in is attached in the WasmEdge release tarballs.
Plug-in | Rust Crate | Released Platforms | Build Steps |
---|---|---|---|
WasmEdge-Process | wasmedge_process_interface | manylinux2014 x86_64 , manylinux2014 aarch64 , and ubuntu 20.04 x86_64 (since 0.10.0 ) | Build With WasmEdge-Process |
WASI-Crypto | wasi-crypto | manylinux2014 x86_64 , manylinux2014 aarch64 , and ubuntu 20.04 x86_64 (since 0.10.1 ) | Build With WASI-Crypto |
WASI-NN with OpenVINO backend | wasi-nn | ubuntu 20.04 x86_64 (since 0.10.1 ) | Build With WASI-NN |
WASI-NN with PyTorch backend | wasi-nn | ubuntu 20.04 x86_64 (since 0.11.1 ) | Build With WASI-NN |
WASI-NN with TensorFlow-Lite backend | wasi-nn | manylinux2014 x86_64 , manylinux2014 aarch64 , and ubuntu 20.04 x86_64 (since 0.11.2 ) | Build With WASI-NN |
Due to the
OpenVINO
andPyTorch
dependencies, we only release the WASI-NN plug-in onUbuntu 20.04 x86_64
now. We'll work withmanylinux2014
versions in the future.