Tech.html

Web Compiler Lab

Open-source experimental compiler translating C++ to WebAssembly for browser execution.

Try the Demo →

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.

  • 1
    Write standard C++ source code
  • 2
    Compile with Emscripten to WebAssembly
  • 3
    Bind to JavaScript for web interface
  • 4
    Execute in browser with near-native performance
[Workflow visualization showing C++ source → Compiler → WebAssembly → Browser]
C++17 Wasm32

Sample Code Snippet

C++ Wasm
// 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

[WebAssembly Interactive Console Placeholder]

Requires active WebAssembly support and JavaScript enabled