This project creates a simple Rust gateway to interact with the RxInfer example Julia project MountainCarAI, which creates and runs Active Inference agents. This project binds to the Mountain Car simulation (Julia function run_simulation) from Rust via jlrs.
-
Rust: Make sure you have Rust installed on your system. You can install it from https://www.rust-lang.org/tools/install.
-
Julia: Ensure Julia 1.10.5 is installed on your system. You will need to download the full archive from https://julialang.org/downloads/ and extract and deploy per jlrs requirements:
- linux: extract archive to $HOME and add these commands to .bashrc:
export JULIA_DIR="$HOME/julia-1.10.5" export PATH="$JULIA_DIR/bin:$PATH" export LD_LIBRARY_PATH=$JULIA_DIR/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-
Clone this repository:
git clone https://github.com/your-username/jlrs-mountain-car.git
-
MountainCarAI: Clone the MountainCarAI project at the same directory level as this project:
git clone https://github.com/sustia-llc/MountainCarAI.git
Your directory structure should look like this:
parent_directory/ ├── jlrs-mountain-car/ └── MountainCarAI/
cd jlrs-mountain-car
cargo run