Using Rust for ‘Scripting’


This isn’t really “scripting” per se, but it’s a nice demonstration (I think) of how you can use Cargo for little one-off tools. More interesting, thanks to a careful walkthrough by @retep998, it includes instructions for cross compilation from macOS to Windows (which should be pretty easy to translate to doing the same from Linux).

Using Rust for ‘Scripting’—With a bonus: cross-compiling from macOS to Windows!

Note that the title is somewhat misleading: there are lots of “scripting”-style tasks I wouldn’t do with Rust; the point is that for these little one-offs, it can be handy—and it’s easy to ship cross-platform now, courtesy of the really fantastic work @brson and company have done on rustup!