A modern, interactive web-based Rust compiler that allows you to write, compile, and execute Rust code directly in your browser. It supports real-time output streaming, interactive standard input (stdin), and now features a full-stack architecture with user authentication and snippet management.
- Real-time Compilation: Instant feedback with streaming output.
- Interactive Input: Support for
std::io::stdinallows you to interact with your running programs. - User Authentication: Secure Login and Registration using JWT and Argon2 hashing.
- Snippet Management: Save, Edit, Delete, and List your code snippets (CRUD).
- Modern UI: Built with React, HeroUI, and Framer Motion for a sleek, glassmorphism aesthetic.
- Monaco Editor: Full-featured code editor with syntax highlighting for Rust.
- API Documentation: Interactive Swagger UI for backend endpoints.
- Language: Rust
- Framework: Axum
- Database: SQLite (via
sqlx) - Authentication: JWT (
jsonwebtoken) & Argon2 - Documentation: Utoipa (Swagger UI)
- Runtime: Tokio
- Communication: WebSockets (
axum::extract::ws) & REST API
- Framework: React 19 + Vite
- Routing: React Router Dom
- State Management: Context API (Auth)
- UI Library: HeroUI (NextUI) + Tailwind CSS
- Editor: Monaco Editor (
@monaco-editor/react) - Animations: Framer Motion
-
Clone the repository
git clone https://github.com/Patricklumowa/Online-Rust-Compiler.git cd Online-Rust-Compiler -
Start the Backend
cd backend cargo runThe server will start on
http://localhost:3001.- API:
http://localhost:3001 - Swagger UI:
http://localhost:3001/swagger-ui - WebSocket:
ws://localhost:3001/ws
- API:
-
Start the Frontend Open a new terminal:
cd frontend npm install npm run devThe UI will be available at
http://localhost:5173.
- Register/Login: Create an account to save your work.
- Dashboard: Manage your saved snippets.
- Editor: Write Rust code.
- Run: Click Run Code to compile and execute.
- Save: Persist your snippets to the database.
- Interact: If your program asks for input, type in the terminal pane.
Contributions are welcome! Please feel free to submit a Pull Request.