This repository contains the Rust code for Lingua Franca's (LF) Runtime Infrastructure (RTI) for federated execution of LF.
Disclaimer
This RTI is still a work in progress with unimplemented functionalities; thus, it may not work for certain federated LF programs. Please let @chanijjani or @hokeun know if you find any issues when running federated LF programs with this Rust RTI.
- Rust runtime: https://www.rust-lang.org/tools/install
- Update system to the latest.
sudo apt update
- Install packages for Rust dependents.
sudo apt install -y curl gcc make build-essential
- Install Rust.
curl https://sh.rustup.rs -sSf | sh
- Check Rust installation.
source ~/.profile
source ~/.cargo/env
rustc -V
You can see rustc 1.xx.0 (...)
.
- Download sources from Github
https://github.com/hokeun/lf-rust-rti.git
- Change the directory into
lf-rust-rti/rust/rti
, then run thecargo run
command with options for running the RTI, as shown below.
cd lf-rust-rti/rust/rti
cargo run -- -n 2
- Download and generate the LF test programs
- Download sources from https://github.com/lf-lang/lingua-franca
- Refer https://www.lf-lang.org/docs/installation
- Execute Rust RTI first
cargo run -- -n 2
- Execute a LF test program
- ex) For HelloDistributed program, execute following commands in each shell.
lingua-franca/test/C/fed-gen/HelloDistributed/bin$ ./federate_s lingua-franca/test/C/fed-gen/HelloDistributed/bin$ ./federate_d
- ex) For HelloDistributed program, execute following commands in each shell.
Currently passing federated tests (lingua-franca/test/C/src/federated/) with Rust RTI: (to be updated)
- DistributedCount.lf, DistributedStop.lf, HelloDistributed.lf, PingPongDistibuted.lf, SimpleFederated.lf, StopAtShutdown.lf