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

3

5

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

Nonattendance answered 24/1, 2019 at 6:46 Comment(0)
P
2

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

Parish answered 24/1, 2019 at 6:59 Comment(4)
Can you please explain , where does the compilation part takes place ?. Because it running compiled C and C++ code. Am I right ?Nonattendance
Native Client web application consists of JavaScript, HTML, CSS, and a NaCl module written in a language supported by the SDK. The NaCl SDK currently supports C and C++. Please go through this video & this website for understanding it better.Parish
Native Client is now obsolete, so it will be removed from Chrome later this year.Crescendo
Native client has been removed as of 2022.Hoahoactzin
B
3

You can run linux in the browser, it also has the gcc compiler which you can use from the command line: jslinux

Bullbat answered 9/8, 2019 at 12:22 Comment(0)
P
2

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

Parish answered 24/1, 2019 at 6:59 Comment(4)
Can you please explain , where does the compilation part takes place ?. Because it running compiled C and C++ code. Am I right ?Nonattendance
Native Client web application consists of JavaScript, HTML, CSS, and a NaCl module written in a language supported by the SDK. The NaCl SDK currently supports C and C++. Please go through this video & this website for understanding it better.Parish
Native Client is now obsolete, so it will be removed from Chrome later this year.Crescendo
Native client has been removed as of 2022.Hoahoactzin
C
2

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.

Crescendo answered 28/5, 2019 at 22:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.