write go-chat with rust
https://github.com/21pages/rust-chat.git
This project is to use rust to do what go can do.
They share the same database and frontend.
| go-chat | rust-chat | |
|---|---|---|
| backend | gin | axum |
| frontend | react | react |
| database | mysql | mysql |
| orm/sql-package | gorm | sqlx |
| log | zap | tracing |
| config | viper | dotenv |
| protobuf | github.com/gogo/protobuf/proto | prost |
| coroutine | go routine | tokio task |
| channel | go channel | tokio channel |
| websocket | github.com/gorilla/websocket | axum websocket |
git clone git@github.com:21pages/rust-chat.git
cd rust-chat
chat.sql.envcargo install sqlx-cli
cargo sqlx prepare
cargo run
git clone git@github.com:kone-net/go-chat-web.git
cd go-chat-web
IP_PORTinsrc/common/param/Params.jsxnpm install
npm start
http://127.0.0.1:3000