3 ms·
This won’t work for many people who don’t know the language or its ecosystem, but I’ve started doing my ad-hoc scripting in Rust using rust-script [0]. I’ve got
by curun1r 6y ago
This won’t work for many people who don’t know the language or its ecosystem, but I’ve started doing my ad-hoc scripting in Rust using rust-script [0]. I’ve got a template with lots of boilerplate for everything I might need and I just copy it and delete the parts I don’t want. Having argument parsing, dotenv init, toml configuration and such ready to go with just a few tweaks, simple user prompting with dialoguer [1] and easy delegation to other tools with cmd_lib [2] means I can often write the tool I’m envisioning in just a couple of minutes.
[0] https://rust-script.org/ https://rust-script.org/
[1] https://crates.io/crates/dialoguer https://crates.io/crates/dialoguer
[2] https://crates.io/crates/cmd_lib https://crates.io/crates/cmd_lib