What is Web Compiler?
Web Compiler is a research project exploring interoperability between native code and web technologies. It demonstrates how traditional C++ applications can be compiled to run in modern web browsers using WebAssembly and Emscripten toolchain.
C++ to Wasm
Compile native C++ applications into portable WebAssembly modules.
Browser Execution
Run compiled modules in any browser with WebAssembly support.
Live Debug
Interactive console for testing compiled output with real-time updates.
Compiler Workflow
This project demonstrates a modern build pipeline that bridges native code and web execution. Our workflow includes: code compilation, environment binding, and browser integration.
-
1Write standard C++ source code
-
2Compile with Emscripten to WebAssembly
-
3Bind to JavaScript for web interface
-
4Execute in browser with near-native performance
Sample Code Snippet
// Input C++ code int add(int a, int b) { return a + b; } // JavaScript binding Module.cwrap('add', 'number', ['number', 'number']); // WebAssembly Result // Web Compiler converts this to: (module (func (param $a i32) (param $b i32) (result i32)) get_local $a get_local $b i32.add ) )
Interactive Demo
Requires active WebAssembly support and JavaScript enabled