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/plugin/ebpf.md
+98-4
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,101 @@ sidebar_position: 7
4
4
5
5
# Build with eBPF Plug-in
6
6
7
-
<!-- prettier-ignore -->
8
-
:::info
9
-
Work in Progress
10
-
:::
7
+
The eBPF (extended Berkeley Packet Filter) plug-in provides an interface to execute eBPF programs in WasmEdge. It allows WasmEdge to execute eBPF code that is compiled into WebAssembly format. This guide will walk you through the steps to build WasmEdge with the eBPF plug-in.
8
+
9
+
## Build the eBPF Plug-in
10
+
11
+
### Prerequisites
12
+
13
+
Before building the eBPF plug-in, ensure that you have the following installed:
14
+
15
+
* WasmEdge - If you haven't installed it, follow the [follow the guide to build from source](../os/linux.md).
16
+
* libbpf - This plug-in requires `libbpf >= 1.2`. See [Building libbpf](https://github.com/libbpf/libbpf#building-libbpf) for details.
17
+
18
+
### Build steps
19
+
20
+
To build the eBPF plug-in, run the following commands at the root of the WasmEdge project:
After building, you can find the plug-in at `./build/plugins/wasm_bpf/libwasmedgePluginWasmBpf.so` and the WasmEdge CLI tool at `./build/tools/wasmedge/wasmedge`.
71
+
72
+
To run the examples, set `WASMEDGE_PLUGIN_PATH=./build/plugins/wasm_bpf/` and run wasmedge:
Adjust `WASMEDGE_PLUGIN_PATH` according to your build directory of the plug-in.
79
+
80
+
## Host Functions
81
+
82
+
This plug-in adds six host functions that give your Wasm application access to eBPF. All of these functions are in the module `wasm_bpf`, if you loaded this plug-in:
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/image.md
+4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 4
4
4
5
5
# Build WasmEdge With WasmEdge-Image Plug-in
6
6
7
+
The WasmEdge Image plug-in is a software component that extends the functionality of the WasmEdge runtime, enabling it to load and decode JPEG and PNG images and convert them into tensors. This plug-in is useful for developers who need to process image data within their WebAssembly applications.
8
+
7
9
## Prerequisites
8
10
9
11
The prerequisites of the WasmEdge-Image plug-in is the same as the WasmEdge building environment on the [Linux platforms](../os/linux.md) or [MacOS platforms](../os/macos.md).
@@ -39,3 +41,5 @@ If the built `wasmedge` CLI tool cannot find the WasmEdge-Image plug-in, you can
39
41
:::
40
42
41
43
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.
44
+
45
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasmedge_image).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/process.md
+16-1
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 3
4
4
5
5
# Build WasmEdge With WasmEdge-Process Plug-in
6
6
7
+
The WasmEdge Process plug-in provides a sandboxed environment to execute system processes in a secured manner. This guide will walk you through the steps to build the WasmEdge Process plug-in.
8
+
7
9
## Prerequisites
8
10
9
11
The prerequisites of the WasmEdge-Process plug-in is the same as the [WasmEdge building environment on the Linux platforms](../os/linux.md).
@@ -16,7 +18,7 @@ To enable the WasmEdge WasmEdge-Process, developers need to [building the WasmEd
# For the WasmEdge-Process plugin, you should install this project.
21
+
# For the WasmEdge-Process plug-in, you should install this project.
20
22
cmake --install build
21
23
```
22
24
@@ -26,3 +28,16 @@ If the built `wasmedge` CLI tool cannot find the WasmEdge-Process plug-in, you c
26
28
:::
27
29
28
30
Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WasmEdge-Process plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasmEdgeProcess.so` after installation.
31
+
32
+
## Usage
33
+
To use the plug-in with WasmEdge, you need to specify it when starting the WasmEdge runtime:
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/rusttls.md
+67-5
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,71 @@
2
2
sidebar_position: 8
3
3
---
4
4
5
-
# Build with Rusttls Plugin
5
+
# Build with Rusttls Plug-in
6
6
7
-
<!-- prettier-ignore -->
8
-
:::info
9
-
Work in Progress
10
-
:::
7
+
The WasmEdge Rustls plug-in is a replacement for the OpenSSL plug-in in WasmEdge. It provides a Rust-friendly interface to the Rustls library, which is a modern, fast, and more secure alternative to OpenSSL.
8
+
9
+
Here's a step-by-step guide on how to build the WasmEdge Rustls plug-in:
10
+
11
+
# Building the WasmEdge Rustls Plug-in
12
+
13
+
The WasmEdge Rustls plug-in is a replacement for the OpenSSL plug-in in WasmEdge. It provides a Rust-friendly interface to the Rustls library, which is a modern, fast, and more secure alternative to OpenSSL.
14
+
15
+
Here's a step-by-step guide on how to build the WasmEdge Rustls plug-in:
16
+
17
+
## Prerequisites
18
+
19
+
Ensure the following dependencies are installed on your system:
20
+
21
+
- Rust: You can install it from the [official website](https://www.rust-lang.org/tools/install).
22
+
- CMake: Minimum version 3.12. Install it from the [official website](https://cmake.org/download/).
Replace `your_wasm_file.wasm` with the path to your WebAssembly file. The `--rustls_plugin` flag specifies the path to the Rustls plug-in.
69
+
70
+
That's it! You have successfully built and installed the WasmEdge Rustls plug-in. Please ensure to replace the OpenSSL plug-in with the Rustls plug-in in your WasmEdge runtime configuration if you were previously using OpenSSL.
71
+
72
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasi_crypto).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/tensorflow.md
+4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 5
4
4
5
5
# Build WasmEdge With WasmEdge-Tensorflow Plug-in
6
6
7
+
The WasmEdge-TensorFlow plug-in is a software component that extends the functionality of the WasmEdge runtime. It allows developers to perform TensorFlow model inference with similar APIs to Python. The plug-in is designed for Rust to WebAssembly applications and depends on the TensorFlow C library for its operations.
8
+
7
9
## Prerequisites
8
10
9
11
The prerequisites of the WasmEdge-Tensorflow plug-in is the same as the WasmEdge building environment on the [Linux platforms](../os/linux.md) or [MacOS platforms](../os/macos.md).
Or create the symbolic link in the current directory and set the environment variable `export LD_LIBRARY_PATH=$(pwd):${LD_LIBRARY_PATH}`.
75
+
76
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasmedge_tensorflow).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/tensorflowlite.md
+4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 6
4
4
5
5
# Build WasmEdge With WasmEdge-TensorflowLite Plug-in
6
6
7
+
The WasmEdge-TensorflowLite plug-in is a software component that extends the functionality of the WasmEdge runtime to perform TensorFlow-Lite model inference. It allows WebAssembly applications to access TensorFlow-Lite functionality when executed on the WasmEdge runtime. The plugin provides a bridge between the WasmEdge runtime and the TensorFlow-Lite backend, allowing developers to execute machine learning models within WebAssembly applications.
8
+
7
9
## Prerequisites
8
10
9
11
The prerequisites of the WasmEdge-TensorflowLite plug-in is the same as the WasmEdge building environment on the [Linux platforms](../os/linux.md) or [MacOS platforms](../os/macos.md).
Or set the environment variable `export LD_LIBRARY_PATH=$(pwd):${LD_LIBRARY_PATH}`.
67
+
68
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasmedge_tensorflowlite).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/wasi_crypto.md
+4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 1
4
4
5
5
# Build with WASI-Crypto Plug-in
6
6
7
+
WebAssembly System Interface (WASI) Crypto is a proposal for a set of APIs that provide cryptographic operations for WebAssembly modules. It aims to provide a consistent, portable, and secure interface for cryptographic operations across different platforms. The WasmEdge WASI-Crypto plug-in is an implementation of this proposal, providing cryptographic functionalities to WebAssembly applications running on the WasmEdge runtime.
8
+
7
9
## Prerequisites
8
10
9
11
Currently, WasmEdge used `OpenSSL 1.1` or `3.0` for the WASI-Crypto implementation.
@@ -75,3 +77,5 @@ If the built `wasmedge` CLI tool cannot find the WASI-Crypto plug-in, you can se
75
77
:::
76
78
77
79
Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-Crypto plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiCrypto.so` after installation.
80
+
81
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasmedge_process).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/wasi_logging.md
+14-1
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 1
4
4
5
5
# Build WasmEdge With WASI-Logging Plug-in
6
6
7
+
WASI-Logging allows WebAssembly applications to log messages in a standardized way. This becomes particularly helpful when debugging applications or understanding the flow of execution within them. The WASI-Logging plug-in is designed to be straightforward to use, enabling developers to focus more on their application logic and less on logging mechanics.
8
+
7
9
## Prerequisites
8
10
9
11
The prerequisite of the Wasi-Logging plug-in is the same as the WasmEdge building environment on the [Linux](../os/linux.md) and [MacOS](../os/macos.md) platforms.
@@ -25,4 +27,15 @@ cmake --install .
25
27
If the built `wasmedge` CLI tool cannot find the WASI-Logging plug-in, you can set the `WASMEDGE_PLUGIN_PATH` environment variable to the plug-in installation path (`/usr/local/lib/wasmedge`, or the built plug-in path `build/plugins/wasi_logging`) to try to fix this issue. You should find `libwasmedgePluginWasiLogging.so` in your `WASMEDGE_PLUGIN_PATH`
26
28
:::
27
29
28
-
Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-Logging plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiLogging.so` after installation.
30
+
Then you will have an executable `wasmedge` runtime under `/usr/local/bin` and the WASI-Logging plugin under `/usr/local/lib/wasmedge/libwasmedgePluginWasiLogging.so` after installation.
31
+
32
+
## Loading WASI-Logging Plug-in
33
+
If the built `wasmedge` CLI tool cannot find the WASI-Logging plug-in, 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/wasi_logging/`) to resolve this issue 1.
34
+
35
+
After installation, the `wasmedge` runtime will be located under `/usr/local/bin` and the WASI-Logging plug-in under `/usr/local/lib/wasmedge/libwasmedgePluginWasiLogging.so`.
36
+
37
+
## Using WASI-Logging in Your Applications
38
+
You can use the WASI-Logging plug-in in your WebAssembly applications to log messages in a standardized way.
39
+
40
+
41
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasi_logging).
Copy file name to clipboardExpand all lines: docs/contribute/source/plugin/wasi_nn.md
+4
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_position: 2
4
4
5
5
# Build with WASI-nn Plug-in
6
6
7
+
The WASI-NN plug-in is a proposed WebAssembly System Interface (WASI) API for machine learning. It allows WebAssembly programs to access host-provided machine learning functions.
8
+
7
9
## Prerequisites
8
10
9
11
Currently, WasmEdge used OpenVINO™ or PyTorch as the WASI-NN backend implementation. For using WASI-NN on WasmEdge, you need to install [OpenVINO™](https://docs.openvino.ai/2023.0/openvino_docs_install_guides_installing_openvino_apt.html)(2023) or [PyTorch 1.8.2 LTS](https://pytorch.org/get-started/locally/) for the backend.
@@ -125,3 +127,5 @@ Or set the environment variable `export LD_LIBRARY_PATH=$(pwd):${LD_LIBRARY_PATH
125
127
:::note
126
128
We also provided the `darwin_x86_64`, `darwin_arm64`, and `manylinux_aarch64` versions of the TensorFlow-Lite pre-built shared libraries.
127
129
:::
130
+
131
+
For more information, you can refer to the [GitHub repository](https://github.com/WasmEdge/WasmEdge/tree/master/plugins/wasi_nn).
0 commit comments