A high-performance, real-time collaborative canvas application built with Rust and modern web technologies
Features • Quick Start • Installation • Usage • Contributing
- 🚀 Blazing Fast Performance - Built with Rust for maximum speed and efficiency
- 🌐 Real-time Collaboration - Multiple users can draw and design together simultaneously
- 💰 Completely Free - No subscriptions, no hidden costs, forever free and open source
- 🎯 Professional Tools - Advanced drawing tools and design capabilities
- 🔒 Secure - Built with security and privacy in mind
- 📱 Cross-Platform - Works on Windows, macOS, and Linux
- 🎨 Modern UI - Clean, intuitive interface designed for productivity
- ⚡ WebSocket Communication - Ultra-low latency real-time updates
- 🗃️ Persistent Storage - SQLite database for reliable data persistence
Get RustCanvas up and running in just a few commands:
- Rust (latest stable version)
- Node.js (for protocol buffer generation)
- Protocol Buffers Compiler (protoc) - Must be accessible via
protoccommand in terminal - Git
-
Clone the repository
git clone https://github.com/yourusername/RustCanvas.git cd RustCanvas -
Install Node.js dependencies
npm install
This installs
protoc-gen-jswhich is required for generating JavaScript protocol buffer files.Note: Make sure
protocis installed and available in your PATH. You can verify this by running:protoc --version
If this command fails, please install Protocol Buffers from the official downloads page.
-
Build the protocol crate
cargo build -p protocol
This runs the build script that generates both Rust and JavaScript code from the protocol buffer definitions.
-
Build the entire project
cargo build --release
-
Locate and run the executable
The compiled executable will be located at:
# On Windows target/release/rustcanvas.exe # On Linux/macOS target/release/rustcanvas
Run it directly:
# Windows ./target/release/rustcanvas.exe # Linux/macOS ./target/release/rustcanvas
That's it! 🎉 RustCanvas should now be built and found in the target/release directory.
RustCanvas is built as a modular workspace with the following crates:
crates/
├── rustcanvas/ # Main application entry point
├── webserver/ # HTTP server and WebSocket handling
├── protocol/ # Protocol buffer definitions and networking
├── db/ # Database layer and persistence
├── appstate/ # Application state management
├── config/ # Configuration management
├── authentication/ # User authentication and authorization
├── utils/ # Shared utilities
├── macros/ # Custom derive macros
└── prettylogs/ # Enhanced logging functionality
Prerequisites for Development:
Make sure you have protoc installed and accessible in your PATH:
protoc --versionIf protoc is not installed, follow these platform-specific instructions:
Windows:
- Download the latest release from Protocol Buffers releases
- Extract the
protoc.exeto a directory (e.g.,C:\protoc\bin\) - Add that directory to your PATH environment variable
- Restart your terminal and verify with
protoc --version
macOS:
# Using Homebrew
brew install protobuf
# Using MacPorts
sudo port install protobuf3-cppLinux (Ubuntu/Debian):
# Using apt
sudo apt update
sudo apt install protobuf-compiler
# Using snap
sudo snap install protobuf --classicLinux (CentOS/RHEL/Fedora):
# Using dnf/yum
sudo dnf install protobuf-compiler
# or
sudo yum install protobuf-compilerBuilding the Project:
# First, ensure npm dependencies are installed
npm install
# Build protocol crate (generates proto bindings)
cargo build -p protocol
# Development build (faster compilation)
cargo build
# Optimized release build (maximum performance)
cargo build --release # Run development version
./target/debug/rustcanvas # Linux/macOS
./target/debug/rustcanvas.exe # Windows
# Run optimized version
./target/release/rustcanvas # Linux/macOS
./target/release/rustcanvas.exe # WindowsThe protocol crate includes a build script that automatically generates both Rust and JavaScript code from protocol buffer definitions. If you modify the protocol buffer definitions in crates/protocol/proto/messages.proto, you'll need to rebuild:
# Rebuild protocol crate (regenerates bindings)
cargo build -p protocol
# Then rebuild the entire project
cargo buildThe build script will:
- Generate Rust code using
prost - Generate JavaScript code using
protoc-gen-js - Copy generated files to appropriate locations
RustCanvas includes highly optimized build profiles:
- Development: Fast compilation with some optimizations for dependencies
- Release: Maximum performance with LTO, panic=abort, and aggressive optimizations
RustCanvas is designed for maximum performance:
- Ultra-low latency WebSocket communication
- Memory efficient with Rust's zero-cost abstractions
- CPU optimized with advanced compiler optimizations
- Scalable architecture supporting thousands of concurrent users
We welcome contributions from the community! Here's how you can help:
- 🍴 Fork the repository
- 🔧 Create a feature branch (
git checkout -b feature/amazing-feature) - 💡 Make your changes
- ✅ Add tests if applicable
- 📝 Commit your changes (
git commit -m 'Add amazing feature') - 🚀 Push to the branch (
git push origin feature/amazing-feature) - 🎯 Open a Pull Request
- Follow Rust best practices and idioms
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
- The Rust community for providing excellent tools and libraries
- Contributors who help make RustCanvas better
- Users who provide feedback and bug reports
Found a bug or have a feature request? Please open an issue on our GitHub Issues page.
If you find RustCanvas useful, please consider giving it a star! ⭐
Made with ❤️ and Rust
Empowering creativity through open source collaboration