pub fn run_rust_dir(dir: &Path, extra_args: &[String]) -> Result<(), String>Expand description
Runs a directory of loose .rs files by generating a temporary Cargo project.
- Finds the entry file (containing
fn main()) - Creates a cached Cargo project directory
- Copies the entry file as
src/main.rsand all other files assrc/<name>.rs - Collects any embedded dependency manifests from all files
- Invokes
cargo run --quiet