Download the Command Line Tools
The command-line compiler lfc
can be installed in any directory, but it will be most convenient if add its directory to your PATH
environment variable.
To download the current development version of the command-line tools instead of the latest release, replace the following tar and zip files with those from the nightly build.
Linux and macOS
Download lfc 0.4.0 for Linux/Mac and run:
Windows
Download lfc 0.4.0 for Windows and run:
unzip lf-cli-0.4.0.zip .\lf-cli-0.4.0\bin\lfc.ps1 --version
Developer
Clone the repository using one of
or
Then build using gradle
or maven
:
or
Note: The Gradle build also performs tests, which takes a long time.
The comnand-line tools will then be in a directory lingua-franca/bin
.
Using the Command Line Tools
Set up a Lingua Franca project by putting your program in a file with the .lf
extension,
such as Example.lf
and putting that file with a directory called src
.
Then compile the program:
This will create two directories in parallel with the src
directory, src-gen
and bin
. If your target language is a compiled one (like C and C++), then the bin
directory should contain an executable that you can run:
To see the options that can be given to lfc
, get help:
If you have installed the developer setup by cloning the GitHub repository, then there are a number of other command-line tools available in the lingua-franca/bin
directory.