Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to compile code ( C/ C++ ) with in browser?

This question may sound crazy.Is there anything browser based compiler out there ?

like image 491
Malavan Avatar asked Jan 24 '19 06:01

Malavan


2 Answers

Native Client is a sandbox for running compiled C and C++ code in the browser efficiently. You can explore this.

like image 161
Curiousdeveloper Avatar answered Sep 28 '22 14:09

Curiousdeveloper


It is possible to run native binaries in a browser using an x86 emulator in JavaScript, so a C compiler could run in a browser in this way.

It is also possible to write a "self-hosting" C-to-WebAssembly compiler that runs in a browser, such as emception.

like image 24
Anderson Green Avatar answered Sep 28 '22 16:09

Anderson Green