跳到主要内容

(DEPRECATED after 0.14.0) Build with Rustls Plug-in

备注

This plug-in has been deprecated after WasmEdge 0.14.0 because the rustls is replaced by reqwest.

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.

Here's a step-by-step guide on how to build the WasmEdge Rustls plug-in:

Prerequisites​

Install Rust and the dependencies for building WasmEdge on Linux. The 0.13.5 build requires CMake 3.15 or later.

Build and load the plug-in​

Build the runtime and plug-in from the same 0.13.5 source tree:

git clone --branch 0.13.5 --depth 1 https://github.com/WasmEdge/WasmEdge.git
cd WasmEdge
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_PLUGIN_RUSTLS=ON
cmake --build build

Run a module that imports the plug-in using the runtime you just built:

WASMEDGE_PLUGIN_PATH="$PWD/build/plugins/wasmedge_rustls" build/tools/wasmedge/wasmedge your_wasm_file.wasm

For more information, you can refer to the GitHub repository.