Command Line Tools
This article has examples in the following target languages:
- C
- micro-LF
- C++
- Python
- Rust
- TypeScript
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:
$ lfc src/Example.lf
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:
$ bin/Example
To see the options that can be given to lfc, get help:
$ lfc --help
For the uC target, use the ulfg code generator to generate code, or the ulfc compiler for the Native platform (Linux or macOS) to generate and compile code (see https://micro-lf.org).
$ ulfg src/Example.lf
$ ulfc src/Example.lf