maemre / compiler-explorer

Run compilers interactively from your web browser and interact with the assembly
https://godbolt.org/
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Issue 12: Add a "README.md" file for "In-Browser Execution for Compiler Explorer" project (CE frontend) #16

Closed geniuseva closed 1 year ago

geniuseva commented 1 year ago

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.

arbie333 commented 1 year ago

@maemre Can we add our readme file (as shown below) to this repo?

Project: In-browser Execution for Compiler Explorer

Information about the project

What is compiler explorer?

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).

What is our project about?

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.

Build process

Installing Prerequisites

pip install node
node --version
v18.16.0

pip install npm
npm --version
9.5.1

Generate "cflat.js" from farrago repo

Running the developer version of this program

# go to the right directory
cd compiler-explorer/

# run the developer version
make dev EXTRA_ARGS="--language cflat"

What to expect?

Test

Run the test

make test

What to expect?

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
...
maemre commented 1 year ago

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.

geniuseva commented 1 year ago

Thanks for the suggestions! I have made changes and opened a new pull request. Please review it to see if it makes sense now.