Building a Cross-Platform IM Application Using Pure Rust

Hi, everyone~

Recently, I've been working on an Instant Messaging(IM) application and I'm exited to share and discuss this project with you all. This project is entirely built with Rust from the front end to the back end, aiming to create an efficient, stable, and easily extensible cross-platform IM solution.

Project Overview

This IM application supports both desktop and mobile platforms and can be deployed in a distributed manner with elastic and dynamic scaling of components. Here are some key features of the project:

  • Cross-Platform: The front-end is compiled cross-platform using Rust Web Assembly and Tauri, allowing it to run on desktop platforms(Windows/Mac/Linux) with mobile support under testing.
  • High Performance: The backend architecture utilizes Axum,Tonic, Kafka, Redis, PostgreSQL, MongoDB, MinIO, and Synapse, supporting dynamic and elastic expansion under a distributed architecture.
  • Reliability: Supports distributed deployment, where any component can dynamically scale as needed, ensuring high availability and reliability.

Technical Details

Front End

The front end utilizes Rust Web Assembly(WASM) and Tauri to achieve cross-platform compilation. Why choose these technologies?

  • Rust Web Assembly: Delivers near-native performance, especially suitable for real-time applications requiring high performance.
  • Tauri: A lightweight cross-platform framework with minimal binary size, fully supporting Rust development(with some features still in development).

There are many other pages with screenshots. You can run it on your computer and check it out. ~

Back End

The back end combines multiple technology stacks to ensure high performance and scalability.

  • Axum: A powerful web framework suitable for building high-performance web applications.
  • Tonic: Implements gRPC communication, ensuring efficient inter-service communication.
  • Kafka: A distributed stream processing platform for handling high-throughput data streams.
  • Redis: A high-performance in-memory database solving real-time caching and fast data retrieval issues.
  • PostgreSQL: A relational database for persistent storage of business data.
  • MongoDB: A document-oriented database suitable for storing complex data structures.
  • MinIO: An object storage service for handling large files such as audio, video, image and file messages.
  • Synapse: A registration center supporting proactive push and real-time updates on service changes.
  • Architecture Diagram:

Project Features

  • Distributed Architecture: Each system component supports distributed deployment, allowing dynamic expansion of any component to enhance overall system elasticity.
  • Flexibility: Supports dynamic composition and hot-swapping features. Components are decoupled and can be independently maintained and upgraded.
  • Performance Optimization: The combination of various high-performance technology stacks ensures high concurrency handling and low latency for the system.

Thank you so much for reading. I sincerely hope to exchange and learn from more developers through this project. If you're interested in this project or have any suggestions, feel free to visit my GitHub repository to check out the detailed implementation and contribute~

I look forward to hearing your feedback and opinions~

Source code address:

1 Like

screenshots:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.