C+ in your browser

Compiler playground

The JavaScript frontend tokenizes C+, builds an AST, emits JavaScript, and runs the result inside a time-limited Web Worker. Browser execution is for learning and testing; native cspc remains faster and supports operating-system APIs.

Compiler ready
main.cspC+
Press Run to compile and execute.

Compiler pipeline

source → lexer → tokens → parser → AST → JS codegen → Web Worker

This is compilation, not direct AST interpretation. Programs have a three-second safety limit and cannot access the page DOM.

Library compatibility

Browser-safe headers use JavaScript shims. Hardware, OS, CUDA, raw socket, and desktop-window headers are recognized but require native cspc.