https://github.com/forfd8960/rust-ecosystem
https://github.com/forfd8960/rust-ecosystem
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/forfd8960/rust-ecosystem
- Owner: forfd8960
- License: mit
- Created: 2024-05-18T01:44:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-29T00:19:38.000Z (12 months ago)
- Last Synced: 2024-05-29T05:10:18.847Z (12 months ago)
- Language: Rust
- Size: 811 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Ecosystem
## Tracing

## OpenTelemetry
```sh
cargo add opentelemetry-otlp --features toniccargo add opentelemetry
cargo add opentelemetry_sdk --features rt-tokio
cargo add tracing-opentelemetry
```## Macro
```sh
cargo add derive_more
cargo add derive_builder
```## Serde
```sh
cargo add chrono --features serde
```
## chat server
```sh
cargo add dashmap
cargo add tokio-stream
cargo add tokio-util --features codec
cargo add futures
``````sh
2024-05-26T01:36:09.984610Z INFO chat: listen on: 0.0.0.0:8080
2024-05-26T01:36:43.613155Z INFO chat: client conn from: 127.0.0.1:60079
2024-05-26T01:36:55.352600Z INFO chat: [forfd8960 joined the chat]
2024-05-26T01:37:18.456555Z INFO chat: client conn from: 127.0.0.1:60171
2024-05-26T01:37:22.747436Z INFO chat: [alice joined the chat]
```### sender1
```sh
telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Your username:
forfd8960
hello, my friend
[alice joined the chat]
nice to meet u
alice: nice to meet u too
alice: how are u
I'm fine, thank uuser: alice leave the chat left
``````sh
telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Your username:
alice
forfd8960: nice to meet u
nice to meet u too
how are u
forfd8960: I'm fine, thank u
```### tokio-console
