Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What kind of compiler is the compiler explorer?


Asked by Baylor Walter on Dec 01, 2021 FAQ



Compiler Explorer is an interactive online compiler which shows the assembly output of compiled C++, Rust, Go (and many more) code.
And,
Compiler Explorer follows a Code of Conduct which aims to foster an open and welcoming environment. Compiler Explorer was started in 2012 to serve my needs at my previous employer to show how C++ constructs translated to assembly code. It started out as a tmux session with vi running in one pane and watch gcc -S foo.cc -o - running in the other.
In this manner, As others have noted, compiler-compilers are tools which (in theory) generate compilers, or parts of a compiler, from some kind of high-level description of what the compiler (or part of a compiler) should do. The idea was all the rage in the 70s and 80s. Probably the largest research project to try to realise this goal was the PQCC project at CMU.
Consequently,
Compiler Explorer is an interactive compiler exploration website. Edit code in C, C++, Rust, Go, D, Haskell, Swift, Pascal, ispc, Python, Java or in any of the other 31 supported languages, and see how that code looks after being compiled in real time.
Keeping this in consideration,
For example, to only run Compiler Explorer with C++ support, you'd run make EXTRA_ARGS='--language c++'. The Makefile will automatically install all the third party libraries needed to run; using npm to install server-side and client side components.