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’t always want to deal with explicitly setting up Cargo projects for every little script. Using rust-script Let’s have a look at how this works: ...