pub fn run_with_cargo(
source: &str,
source_path: Option<&Path>,
extra_args: &[String],
) -> Result<(), String>Expand description
Compiles and runs a Rust source file that has embedded dependencies.
- Parses the
//!manifest from the source - Creates a cached Cargo project directory
- Writes
Cargo.tomlandsrc/main.rs - Invokes
cargo run --quiet
Stdin/stdout/stderr are inherited, so the program interacts with the terminal normally.