Let's say you have the following folder structure:
.
├── exercise
└── variables
├── Cargo.lock
├── Cargo.toml
└── src
└── main.rs
You're in root level and wants to run Cargo for variables folder. All you need to do is specifying --manifest-path:
cargo run --manifest-path variables/Cargo.toml