Writing scripts in Rust – with rust-script or nightly Cargo

A while ago I stumbled upon rust-script , a tool which lets you write single-file Rust programs and execute them as if they were standalone script files. This comes in very handy when you want to experiment with Rust code, write up executable examples or build small utility programs, but don&rsquo;t always want to deal with explicitly setting up Cargo projects for every little script. Using…