Skip to content

Commit ecce126

Browse files
committed
update docs
1 parent f442d85 commit ecce126

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ keywords = ["websocket", "io", "web", "async"]
1313
categories = ["web-programming::websocket", "network-programming", "asynchronous"]
1414

1515
[package.metadata.docs.rs]
16-
features = ["rt_tokio"]
16+
features = ["io_tokio"]
1717

1818
[dependencies]
1919
# IO interfaces / utilities

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
* Minimal and Efficient : minimal codebase to provide efficient, memory-safe WebSocket handling.
1717

18-
* Multi-Environment : `tokio`, `smol`, `glommio`, `nio` are supported as async runtime ( by feature flags `rt_{name}` ).
18+
* Multi-Environment : works with any async runtimes with `tokio::io` or `futures_io` interface
19+
(for example: `tokio` or `nio` use `tokio::io` interface,
20+
and `smol` or `glommio` use `futures_io` interface).\
21+
Feature flags **`io_tokio`** or **`io_futures`** enables integration for respective IO interface.
1922

2023
## Note
2124

@@ -25,15 +28,15 @@ MEWS is NOT WebSocket server, just protocol implementation. So :
2528

2629
* Doesn't builtins `wss://` support.
2730

28-
## Feature Flags
31+
## Usage
2932

30-
- `tcpstream-only` : limit `split` functionality to only the runtime's `TcpStream`, in exchange for possible performance optimization.
33+
**`io_tokio`** or **`io_futures`** must be activated to integrate with async IO interfaces.
3134

32-
## Example
35+
Here specifying `io_tokio` to use with `tokio`:
3336

3437
```toml
3538
[dependencies]
36-
mews = { version = "0.4.0", features = ["rt_tokio"] }
39+
mews = { version = "0.4.0", features = ["io_tokio"] }
3740
tokio = { version = "1", features = ["full"] }
3841
# ...
3942
```

0 commit comments

Comments
 (0)