Creating a new project¶
First thing first, you must create a folder for your project. Let's name it
Then, open a terminal, move into the folder, and type
You are invited to inquire some information like the name of the program, it's ID, it's version, the author and the license.
Then, the following files are created:
hello-world ├── manifest.yml └── src └── main.ergol
manifest.yml file contains some information about the program.
It can also contains compiler options and the list of the program dependencies.
program: id: hello-world name: Hello World version: 1.0.0 author: name: John Doe email: firstname.lastname@example.org legal: license: GPL-3-or-later
src/main.ergol file is the entry point of the program.
You can edit this file and use
log to make the program output a message.
printl function (for "print line") prints a string followed by a line feed (U+000A).
Compiling and running¶
To compile the program simply type
ergol compile in a terminal (at the project root).
Two new directories are created:
This directory contains cache data needed to speed up the next compilations.
This directory contains the compiled program.
Finally, you can run the program.
In order to do so, assuming that your program name is
Hello World, type the following in a terminal (at the project root):