A powerful C++ IDE that runs entirely in your browser using WebAssembly technology. This is not just a syntax highlighter - it's a full-featured development environment with real C++ compilation and execution capabilities.
- Actual Clang Compiler: Uses real WebAssembly-based Clang/LLD binaries
- Live Compilation: Compile C++ code instantly in your browser
- Execution: Run compiled programs directly in the browser
- Error Handling: Detailed compiler output and error reporting
- Syntax Highlighting: Full C++ syntax highlighting with Ace Editor
- 40+ Themes: Extensive collection of professional editor themes
- Code Completion: Intelligent code completion and suggestions
- Keyboard Shortcuts: Customizable shortcuts for productivity
- Local Storage: Persistent code saving in browser storage
- Default Templates: Pre-configured C++ templates for quick start
- File Operations: Create, edit, and manage C++ source files
- Dark Theme: Professional dark interface
- Split Layout: Editor and terminal areas for optimal workflow
- Responsive Design: Works on desktop and tablet browsers
- Status Indicators: Real-time compilation and execution status
- Framework: Astro 5.15.5
- Package Manager: Bun
- Editor: Ace Editor
- Compiler: Clang/LLD WebAssembly
- Language: TypeScript
- Runtime: WebAssembly
- Modern web browser with WebAssembly support
- Bun runtime (for development)
-
Clone the repository
git clone https://github.com/yourusername/panda-edit.git cd panda-edit -
Install dependencies
bun install
-
Start development server
bun run dev
-
Open in browser Navigate to
http://localhost:4321
bun run buildThe built files will be in the dist/ directory, ready for deployment.
- Write Code: Start writing C++ code in the editor
- Compile: Click the Run button or use
Ctrl+Enter - View Output: See compilation results and program output in the terminal
- Save Work: Your code is automatically saved to browser storage
Try this simple "Hello World" program:
#include <iostream>
int main() {
std::cout << "Hello, Panda Edit!" << std::endl;
return 0;
}web.js: Main application class and UI managementcpp_compiler.js: C++ compilation interfacecompiler_worker.js: Web Worker for WASM compilationshared.js: File management and utilitiesshortcuts.js: Keyboard shortcut system
- clang.wasm: C++ compiler binary
- lld.wasm: LLVM linker binary
- memfs.wasm: Memory filesystem
- sysroot.tar: System root environment
graph LR
A[C++ Source] --> B[Web Worker]
B --> C[Clang WASM]
C --> D[LLD WASM]
D --> E[Executable]
E --> F[Browser Execution]
Unlike online code editors that only provide syntax highlighting, Panda Edit actually compiles C++ code using the same Clang compiler used in professional development environments.
Compiled programs run directly in the browser using WebAssembly, providing a sandboxed yet powerful execution environment.
- Multiple cursor support
- Search and replace functionality
- Bracket matching
- Auto-indentation
- Multiple professional themes
The project uses Bunfig for package management configuration:
[install]
cache = false
frozen-lockfile = false
[deploy]
allowed-hostnames = ["https://registry.npmjs.org"]Optimized for WebAssembly with proper CORS headers:
export default defineConfig({
output: 'static',
adapter: netlify(),
vite: {
server: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
}
}
}
});The project includes automated GitHub Pages deployment via GitHub Actions:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./distBuild the project and deploy the dist/ folder to any static hosting service.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly in the browser
- Commit changes:
git commit -m 'Add feature description' - Push to branch:
git push origin feature-name - Open a Pull Request
- Maintain TypeScript strict mode compliance
- Test WebAssembly functionality thoroughly
- Ensure cross-browser compatibility
- Follow existing code style and patterns
WebAssembly Not Loading
- Ensure browser supports WebAssembly
- Check for CORS policy issues
- Verify proper headers are set
Compilation Errors
- Check C++ code syntax
- Ensure proper includes
- Review compiler output for details
Performance Issues
- Large compilations may take time
- Consider browser memory limitations
- Check developer console for errors
This project is licensed under the MIT License - see the LICENSE file for details.
- Ace Editor: For the excellent web-based code editor
- Clang/LLVM: For the powerful C++ compiler toolchain
- WebAssembly: For enabling native code execution in browsers
- Astro: For the modern static site framework
- Bun: For the fast JavaScript runtime
For issues, questions, or contributions:
- Open an issue on GitHub
- Check the troubleshooting section
- Review the code comments for additional context
Panda Edit - Bringing professional C++ development to your browser πΌβ¨