Installation
To install the Termina to C transpiler it is necessary to compile the project directly from the source code. Unfortunately, binary releases are not available yet. To compile the project, it is first necessary to install the Stack tool. The Stack installation instructions can be found through this link.
Once Stack is installed, you can proceed to clone the repository and then compile the project. To do this, you need to execute the following commands:
The first stack
command will initialize the repository and generate the configuration files needed to compile the project. The second one allows you to compile the project and install the binary in a specific directory so that it is accessible for execution.
In order to execute the code generated by the transpiler, it is necessary to install the Termina Operating System Abstraction Layer found in this repository.
By default, the installation path of the Termina OSAL expected by the standard project compilation mechanism is the /opt
directory. However, it is possible to modify the default path specifically for each project.
In the following paragraphs, we will clone the Termina OSAL project and then create a symbolic link to the project directory within the /opt
directory. To do this, it is necessary to execute the following commands:
$ git clone https://github.com/termina-lang/termina-osal
$ cd /opt
$ sudo ln -s /path/to/termina-osal
where /path/to/termina-osal
must point to the actual path corresponding to the cloned repository.