A Lustre transpiler to Rust.
To transpile a simple example:
cargo run <test/simple.mls >test/simple.rsTo transpile, compile and run a simple example:
cd test
make simple
./simpleWhen transpiling a Lustre file, Rustre applies these steps:
- Parsing (see
parser.rsandlustre.pest): build an raw AST (seeast.rs) from an input Lustre file - Normalization (see
normalizer.rs): build a normalized AST (seenast.rs) from a raw AST - Static scheduling (see
sequentializer.rs): re-order equations in nodes so that they can be executed sequentially - Code generation (see
rustfmt.rs): write Rust code from the AST, generate the necessary structures and logic for thefbyoperator
Each file contains a head comment which explains in detail what it does.
MIT