A web-based platform that allows users to write, compile, and run C programs directly in their browser.
- In-browser C code editor with syntax highlighting
- Real-time code compilation and execution
- Interactive user interface
- Secure code execution in the backend
- Frontend: Vite, React, Socket.io, CodeMirror
- Backend: Rust with Warp, Socket.io, and Tokio
web-compiler/
├── client/ # Frontend React application
├── server/ # Rust backend server
- Node.js and pnpm
- Rust and Cargo
- GCC compiler
cd client
pnpm install
pnpm run dev
cd server
cargo run
The frontend development server runs on http://localhost:5173
, and the backend runs on http://localhost:3001
.
- Open
http://localhost:5173
in your browser - Write your C code in the editor
- Click "Run Code" to compile and execute
- View the output in the results panel
The backend executes code in a sandboxed environment with timeouts and resource limitations to prevent abuse.