GithubHelp home page GithubHelp logo

rust-chat's Introduction

introduction

This is rust implementation of go-chat.

This project is to use rust to do what go can do.

They share the same database and frontend.

comparison

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

dependency

  • rust
  • mysql

steps to build

backend

  1. get project

    git clone [email protected]:21pages/rust-chat.git
    cd rust-chat
  2. create mysql database with chat.sql

  3. modify .env

  4. sqlx preparation

    cargo install sqlx-cli
    cargo sqlx prepare
  5. build && run

    cargo run

frontend

  1. get project

    git clone [email protected]:kone-net/go-chat-web.git
    cd go-chat-web
  2. modify IP_PORTinsrc/common/param/Params.jsx

  3. prepare npm environment

    npm install
    
  4. run project

    npm start
  5. visit frontend entry http://127.0.0.1:3000

schedule

  • | axum router, cors
  • | sqlx, model map
  • | user register, login, friends, group join
  • | message
  • | appstate, channel, websocket
  • | file upload & download
  • | kafka

rust-chat's People

Contributors

21pages avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.