Skip to content

Commit 117e143

Browse files
authored
Merge pull request #7 from lveyde/master
Update Cargo.toml
2 parents 77771ba + 7beeee4 commit 117e143

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

Cargo.toml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ license = "MIT/Apache-2.0"
77
name = "mysql_async_wasi"
88
readme = "README.md"
99
repository = "https://github.com/WasmEdge/mysql_async_wasi"
10-
version = "0.31.4"
10+
version = "0.31.5"
1111
exclude = ["test/*"]
1212
edition = "2018"
1313
categories = ["asynchronous", "database"]
1414

1515
[dependencies]
1616
bytes = "1.0"
1717
crossbeam = "0.8.1"
18-
flate2 = { version = "1.0", features = ["zlib"], default-features = false }
18+
flate2 = { version = "1.0", default-features = false }
1919
futures-core = "0.3"
2020
futures-util = "0.3"
2121
futures-sink = "0.3"
@@ -107,35 +107,32 @@ tokio_wasi = { version = "1", features = [
107107
rand = "0.8.0"
108108

109109
[features]
110-
default = [
111-
"mysql_common/bigdecimal03",
112-
"mysql_common/rust_decimal",
113-
"mysql_common/time03",
114-
"mysql_common/uuid",
115-
"mysql_common/frunk",
116-
# "native-tls-tls",
117-
]
110+
default = ["common", "rust_backend"]
118111
default-rustls = [
119-
"flate2/zlib",
112+
"common",
113+
"rust_backend",
114+
"rustls-tls",
115+
]
116+
common = [
120117
"mysql_common/bigdecimal03",
121118
"mysql_common/rust_decimal",
122119
"mysql_common/time03",
123120
"mysql_common/uuid",
124121
"mysql_common/frunk",
125-
"rustls-tls",
126122
]
127-
minimal = ["flate2/zlib"]
128123
native-tls-tls = ["native-tls", "tokio-native-tls"]
124+
rust_backend = ["flate2/rust_backend"]
129125
rustls-tls = [
130126
"rustls",
131127
"tokio-rustls",
132128
"webpki",
133129
"webpki-roots",
134130
"rustls-pemfile",
135131
]
136-
nightly = []
132+
minimal = ["flate2/zlib"]
137133
zlib = ["flate2/zlib"]
138134
full = ["default", "zlib"]
135+
nightly = []
139136

140137
[lib]
141138
name = "mysql_async"

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tokio based asynchronous MySql client library for The Rust Programming Language.
44
This is a fork from the original [mysql_async](https://github.com/blackbeam/mysql_async) with support for WebAssembly compilation target.
55
That allows async MySql apps to run inside the [WasmEdge Runtime](https://github.com/WasmEdge/WasmEdge#readme) as a lightweight and secure alternative to natively compiled apps in Linux container.
66

7-
For more details and usage examples, please see the upstream [mysql_async](https://github.com/blackbeam/mysql-async) source and [this example](https://github.com/WasmEdge/wasmedge-db-examples/tree/main/mysql_async).
7+
For more details and usage examples, please see the upstream [mysql_async](https://github.com/blackbeam/mysql_async) source and [this example](https://github.com/WasmEdge/wasmedge-db-examples/tree/main/mysql_async).
88

99
Note: We do not yet support SSL / TLS connections to databases in this WebAssembly client.
1010

@@ -18,47 +18,46 @@ mysql_async_wasi = "<desired version>"
1818
## Crate Features
1919

2020
Default feature set is wide – it includes all default [`mysql_common` features][myslqcommonfeatures]
21-
as well as `native-tls`-based TLS support.
21+
as well as `miniz_oxide` `flate2` backend.
2222

2323
### List Of Features
2424

2525
* `minimal` – enables only necessary features (at the moment the only necessary feature
26-
is `flate2` backend). Enables:
26+
is `zlib` `flate2` backend). Enables:
2727

28-
- `flate2/zlib"
28+
- `flate2/zlib`
2929

3030
**Example:**
3131

3232
```toml
3333
[dependencies]
34-
mysql_async = { version = "*", default-features = false, features = ["minimal"]}
34+
mysql_async_wasi = { version = "*", default-features = false, features = ["minimal"]}
3535
```
3636

3737
**Note:* it is possible to use another `flate2` backend by directly choosing it:
3838

3939
```toml
4040
[dependencies]
41-
mysql_async = { version = "*", default-features = false }
41+
mysql_async_wasi = { version = "*", default-features = false }
4242
flate2 = { version = "*", default-features = false, features = ["rust_backend"] }
4343
```
4444

4545
* `default` – enables the following set of crate's and dependencies' features:
4646

47-
- `native-tls-tls`
48-
- `flate2/zlib"
47+
- `flate2/rust_backend`
4948
- `mysql_common/bigdecimal03`
5049
- `mysql_common/rust_decimal`
5150
- `mysql_common/time03`
5251
- `mysql_common/uuid`
5352
- `mysql_common/frunk`
5453

55-
* `default-rustls` – same as default but with `rustls-tls` instead of `native-tls-tls`.
54+
* `default-rustls` – same as default but with `rustls-tls`.
5655

5756
**Example:**
5857

5958
```toml
6059
[dependencies]
61-
mysql_async = { version = "*", default-features = false, features = ["default-rustls"] }
60+
mysql_async_wasi = { version = "*", default-features = false, features = ["default-rustls"] }
6261
```
6362

6463
* `native-tls-tls` – enables `native-tls`-based TLS support _(conflicts with `rustls-tls`)_
@@ -67,26 +66,26 @@ as well as `native-tls`-based TLS support.
6766

6867
```toml
6968
[dependencies]
70-
mysql_async = { version = "*", default-features = false, features = ["native-tls-tls"] }
69+
mysql_async_wasi = { version = "*", default-features = false, features = ["native-tls-tls"] }
7170

7271
* `rustls-tls` – enables `native-tls`-based TLS support _(conflicts with `native-tls-tls`)_
7372

7473
**Example:**
7574

7675
```toml
7776
[dependencies]
78-
mysql_async = { version = "*", default-features = false, features = ["rustls-tls"] }
77+
mysql_async_wasi = { version = "*", default-features = false, features = ["rustls-tls"] }
7978

8079
[myslqcommonfeatures]: https://github.com/blackbeam/rust_mysql_common#crate-features
8180

8281
## TLS/SSL Support
8382

8483
SSL support comes in two flavors:
8584

86-
1. Based on native-tls – this is the default option, that usually works without pitfalls
87-
(see the `native-tls-tls` crate feature).
85+
1. Based on rustls – TLS backend written in Rust (see the `rustls-tls` crate feature).
8886

89-
2. Based on rustls – TLS backend written in Rust (see the `rustls-tls` crate feature).
87+
2. Based on native-tls – this is the option that usually works without pitfalls
88+
(see the `native-tls-tls` crate feature).
9089

9190
Please also note a few things about rustls:
9291
- it will fail if you'll try to connect to the server by its IP address,

0 commit comments

Comments
 (0)