Getting started with CLight
Quickly set up and write your first line of CLight code!
What is CLight?
CLight is a programming language developed by third year Epitech students. Based on C, it reproduces several of the core programming concepts and syntax.
Setup the environment
Follow these instructions to setup your environment:
Update:
Install stack:
Install ghc:
Download llvm:
Setup llvm:
Installing the CLight compiler
To be able to program in CLight, you'll first have to download the compiler:
Download the github repository at https://github.com/EpitechPromo2025/B-FUN-500-MPL-5-2-glados-bastien.boymond, and extract.
Install the dependencies:
Compile the compiler using the Makefile, with the command:
You should now find a new binary called glados
in the part2
folder.
Compiling CLight
Start by creating a simple script in a new file. For this example, we'll call it example.cl
. Let's add a simple function:
To compile, use the binary called glados
:
You should now have an object file called example.o
next to your example.cl
script.
Create another script in the language you want. For this example, we'll use the C programming language, and create a new file called main.c
.
Compile both the main.c file and the example.o file:
Now if you execute the binary, you should see "add: 20" displayed in the terminal:
Last updated