Skip to content

Commit 0a5d9bb

Browse files
committed
Mark the rustls plug-in as deprecated.
Signed-off-by: YiYing He <[email protected]>
1 parent 743be71 commit 0a5d9bb

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

docs/contribute/source/plugin/rusttls.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
sidebar_position: 8
33
---
44

5-
# Build with Rustls Plug-in
5+
# (DEPRECATED after `0.14.0`) Build with Rustls Plug-in
6+
7+
<!-- prettier-ignore -->
8+
:::note
9+
This plug-in has been deprecated after WasmEdge `0.14.0` because the `rustls` is replaced by [`reqwest`](../../../develop/rust/http_service/client.md#the-reqwest-api).
10+
:::
611

712
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.
813

docs/develop/rust/database/my_sql_driver.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ wasmedge --env "DATABASE_SSL=1" --env "DATABASE_URL=mysql://user:[email protected]
3939
In order to compile the `mysql_async` and `tokio` crates, we will need to apply two patches to add
4040
WasmEdge-specific socket APIs to those crates. The following example shows that the TLS connection is enabled.
4141

42-
```
42+
```toml
4343
[patch.crates-io]
4444
tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" }
4545
socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" }
@@ -57,7 +57,7 @@ statements.
5757

5858
Connect to a MySQL database.
5959

60-
```
60+
```rust
6161
// Below we create a customized connection pool
6262
let opts = Opts::from_url(&*get_url()).unwrap();
6363
let mut builder = OptsBuilder::from_opts(opts);
@@ -74,7 +74,7 @@ Connect to a MySQL database.
7474

7575
Create a table on the connected database.
7676

77-
```
77+
```rust
7878
// create table if no tables exist
7979
let result = r"SHOW TABLES LIKE 'orders';"
8080
.with(())
@@ -94,7 +94,7 @@ Create a table on the connected database.
9494

9595
Insert some records into the MySQL database using SQL.
9696

97-
```
97+
```rust
9898
let orders = vec![
9999
Order::new(1, 12, 2, 56.0, 15.0, 2.0, String::from("Mataderos 2312")),
100100
Order::new(2, 15, 3, 256.0, 30.0, 16.0, String::from("1234 NW Bobcat")),
@@ -122,7 +122,7 @@ Insert some records into the MySQL database using SQL.
122122

123123
Query the database.
124124

125-
```
125+
```rust
126126
// query data
127127
let loaded_orders = "SELECT * FROM orders"
128128
.with(())
@@ -147,8 +147,8 @@ Query the database.
147147

148148
Delete some records from the database.
149149

150-
```
151-
// // delete some data
150+
```rust
151+
// delete some data
152152
r"DELETE FROM orders WHERE order_id=4;"
153153
.ignore(&mut conn)
154154
.await?;
@@ -177,8 +177,8 @@ Delete some records from the database.
177177

178178
Update records in the MySQL database.
179179

180-
```
181-
// // update some data
180+
```rust
181+
// update some data
182182
r"UPDATE orders
183183
SET shipping_address = '8366 Elizabeth St.'
184184
WHERE order_id = 2;"
@@ -208,8 +208,7 @@ Update records in the MySQL database.
208208

209209
Close the database connection.
210210

211-
```
211+
```rust
212212
drop(conn);
213213
pool.disconnect().await.unwrap();
214214
```
215-

docs/develop/rust/http_service/client.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ wasmedge compile target/wasm32-wasi/release/wasmedge_hyper_client.wasm wasmedge_
109109
wasmedge wasmedge_hyper_client.wasm
110110
```
111111

112-
In your Rust application, import the [hyper](https://crates.io/crates/hyper) crate,
112+
In your Rust application, import the [hyper](https://crates.io/crates/hyper) crate,
113113
and patch it with WasmEdge sockets patches.
114114
Just add the following line to your `Cargo.toml`.
115115

@@ -138,7 +138,7 @@ wasmedge wasmedge_hyper_client_https.wasm
138138

139139
In the HTTPS version of `Cargo.toml`, you just need to import the standard [hyper-rustls](https://crates.io/crates/hyper-rustls), [rustls](https://crates.io/crates/rustls) and [webpki-roots](https://crates.io/crates/webpki-roots) crates with the same patches as above.
140140

141-
```
141+
```toml
142142
[patch.crates-io]
143143
tokio = { git = "https://github.com/second-state/wasi_tokio.git", branch = "v1.36.x" }
144144
socket2 = { git = "https://github.com/second-state/socket2.git", branch = "v0.5.x" }
@@ -211,4 +211,3 @@ async fn post_url_return_str (url: hyper::Uri, post_body: &'static [u8]) -> Resu
211211
Ok(())
212212
}
213213
```
214-

docs/develop/rust/setup.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,16 @@ rustup target add wasm32-wasi
3636

3737
### Async networking with tokio
3838

39-
WasmEdge supports async networking APIs provided by [Tokio](https://tokio.rs/) and related crates. If you have tokio in your `Cargo.toml`, you
40-
need to add a few config flags to help the Rust compiler choose the correct feature branches in the library source code. Here is an example of `cargo build` command for
41-
compiling a tokio app to Wasm.
39+
WasmEdge supports async networking APIs provided by [Tokio](https://tokio.rs/) and related crates. If you have tokio in your `Cargo.toml`, you
40+
need to add a few config flags to help the Rust compiler choose the correct feature branches in the library source code. Here is an example of `cargo build` command for compiling a tokio app to Wasm.
4241

43-
```
42+
```bash
4443
RUSTFLAGS="--cfg wasmedge --cfg tokio_unstable" cargo build --target wasm32-wasi --release
4544
```
4645

4746
Alternatively, you could add these lines to the `.cargo/config.toml` file.
4847

49-
```
48+
```toml
5049
[build]
5150
target = "wasm32-wasi"
5251
rustflags = ["--cfg", "wasmedge", "--cfg", "tokio_unstable"]
@@ -59,13 +58,12 @@ on MacOS, you need a special version of the Clang tool, released from the offici
5958

6059
> When you compile Rust TLS source code to Wasm on Linux, the result Wasm file is cross-platform and can run correctly on any platform with WasmEdge installed. This section is only applicable when you need to **compile** Rust TLS source code on MacOS.
6160
62-
[Download the latest wasi-sdk release](https://github.com/WebAssembly/wasi-sdk/releases) for your platform and
61+
[Download the latest wasi-sdk release](https://github.com/WebAssembly/wasi-sdk/releases) for your platform and
6362
expand it into a directory. Point the `WASI_SDK_PATH` variable to this directory and export a `CC` variable for the default Clang.
6463

65-
```
64+
```bash
6665
export WASI_SDK_PATH /path/to/wasi-sdk-22.0
6766
export CC="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
6867
```
6968

7069
That's it. Now you can use the `cargo` tools on MacOS to compile tokio libraries with `rust-tls` feature turned on.
71-

docs/start/install.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ WasmEdge plug-ins are pre-built native modules that provide additional functiona
5656
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_nn-ggml
5757
```
5858

59-
To install multiple plug-ins, you can pass a list of plug-ins with the `--plugins` option. For example, the following command installs the `wasi_logging`` and the `wasi_nn-ggml` plug-ins. The `wasi_logging` plug-in allows the Rust [log::Log](https://crates.io/crates/log) API to compile into Wasm and run in WasmEdge.
59+
To install multiple plug-ins, you can pass a list of plug-ins with the `--plugins` option. For example, the following command installs the `wasi_logging`` and the`wasi_nn-ggml` plug-ins. The `wasi_logging` plug-in allows the Rust [log::Log](https://crates.io/crates/log) API to compile into Wasm and run in WasmEdge.
6060

6161
```bash
6262
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_logging wasi_nn-ggml
@@ -254,7 +254,7 @@ curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/insta
254254

255255
### WasmEdge zlib Plug-in
256256

257-
The zlib is required for compiling and running many existing C / C++ / Rust apps in Wasm. Most noticeably, it is required for the Python port to Wasm. It supports the standard [zlib.h](https://github.com/madler/zlib/blob/develop/zlib.h) C API.
257+
The zlib is required for compiling and running many existing C / C++ / Rust apps in Wasm. Most noticeably, it is required for the Python port to Wasm. It supports the standard [zlib.h](https://github.com/madler/zlib/blob/develop/zlib.h) C API.
258258

259259
```bash
260260
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasmedge_zlib
@@ -289,7 +289,6 @@ If you install this plug-in WITHOUT installer, you can [refer to here to install
289289

290290
Then, go to [TensorFlow interface in Rust chapter](../develop/rust/wasinn/tf_plugin.md) to see how to run `WasmEdge-TensorFlow` functions.
291291

292-
293292
### TLS plug-in
294293

295294
<!-- prettier-ignore -->
@@ -299,7 +298,7 @@ The WasmEdge TLS plugin is being deprecated from WasmEdge 0.14.0. We now compile
299298

300299
The WasmEdge TLS plug-in utilizes the native OpenSSL library to support HTTPS and TLS requests from WasmEdge sockets. To install WasmEdge with the TLS plug-in, run the following command.
301300

302-
```
301+
```bash
303302
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.13.5 --plugins wasmedge_rustls
304303
```
305304

docs/start/wasmedge/extensions/plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following lists are the WasmEdge official released plug-ins. Users can insta
2626
| [WasmEdge-TensorflowLite](../../../contribute/source/plugin/tensorflowlite.md)| A native library for inferring TensorFlow-Lite models. | `manylinux2014 (x86_64, aarch64)`<br/>`ubuntu 20.04 (x86_64)`<br/>`darwin (x86_64, arm64)`<br/>(since `0.13.0`) | [Rust](https://crates.io/crates/wasmedge_tensorflow_interface) (0.3.0) | [Steps](../../../contribute/source/plugin/tensorflowlite.md) |
2727
| WasmEdge-OpenCV | Very popular utility functions to process images and videos for AI input/output. | `manylinux2014 (x86_64, aarch64)`<br/>`ubuntu 20.04 (x86_64)`<br/>`darwin (x86_64, arm64)`<br/>(since `0.13.3`) | Rust | |
2828
| [WasmEdge-eBPF](../../../contribute/source/plugin/ebpf.md) | A native library for inferring eBPF applications | `manylinux2014 (x86_64, aarch64)`<br/>`ubuntu 20.04 (x86_64)`<br/>(since `0.13.2`) | Rust | [Steps](../../../contribute/source/plugin/ebpf.md) |
29-
| [WasmEdge-rustls](../../../contribute/source/plugin/rusttls.md) | A native library for inferring Rust and TLS Library | `manylinux2014 (x86_64, aarch64)`<br/>`ubuntu 20.04 (x86_64)`<br/>`darwin (x86_64, arm64)`<br/>(since `0.13.0`) | [Rust](https://crates.io/crates/wasmedge_rustls_api) | [Steps](../../../contribute/source/plugin/rusttls.md) |
29+
| [WasmEdge-rustls](../../../contribute/source/plugin/rusttls.md) (DEPRECATED) | A native library for inferring Rust and TLS Library | `manylinux2014 (x86_64, aarch64)`<br/>`ubuntu 20.04 (x86_64)`<br/>`darwin (x86_64, arm64)`<br/>(since `0.13.0`, until `0.13.5`) | [Rust](https://crates.io/crates/wasmedge_rustls_api) | [Steps](../../../contribute/source/plugin/rusttls.md) |
3030

3131
## Old WasmEdge Extensions
3232

0 commit comments

Comments
 (0)