Closed geniuseva closed 1 year ago
@maemre Can we add our readme file (as shown below) to this repo?
Compiler Explorer is an interactive compiler exploration website. Edit code in C, C++, C#, F#, Rust, Go, D, Haskell, Swift, Pascal, ispc, Python, Java, or any of the other 30+ supported languages, and see how that code looks after being compiled in real time. Multiple compilers are supported for each language, many different tools and visualizations are available, and the UI layout is configurable (thanks to GoldenLayout).
This project focuses on enhancing Compiler Explorer (CE) by adapting it to support in-browser compilers. The primary objectives include restructuring the backend by removing the original CE server and integrating WebAssembly (Wasm) code for compiler execution. Additionally, the project aims to add a new feature of running different compiler passes so that users can better understand the compiler process. Furthermore, the project implements another functionality to load different compilers.
pip install node
node --version
v18.16.0
pip install npm
npm --version
9.5.1
# go to the right directory
cd compiler-explorer/
# run the developer version
make dev EXTRA_ARGS="--language cflat"
Wait until the terminal shows the following lines.
info: Listening on http://localhost:10240/
info: Startup duration: 13769ms
info: =======================================
Open the local webpage in any browser
See the wepage like this
If you see <Compilation failed: unreachable>
on the right hand side (as shown below), try to add a new line at the very end of your input codes on the left hand window.
make test
The terminal is going to run more than 520 tests, and Cflat compiler contains 2 tests among them. If you find them paased as shown below, you are good to go.
...
# The cflat part
Basic compiler setup
✔ Should not crash on instantiation
cflatp compiling
✔ Compiles a simple LIR program
...
The repo contains substantially more than your 590 project. You should add the documentation relevant to your project as a .md
file under the docs/
directory. Create a new PR for that file. Overall, the content in the What is compiler explorer?
section isn't necessary if this is under docs/
.
You can edit README.md to add a link to your project's description.
Thanks for the suggestions! I have made changes and opened a new pull request. Please review it to see if it makes sense now.
The new version of "README.md" file will include information about adding Cflat language, adding Cflat compiler, how to compile it from Wasm instead of CE server, how to add another compiler, how to run different passes of a chosen compiler. Also, the build process, test run, and what to expect when running it.