3 ms·
Also go has the advantage of producing a single static binary. Easy to build on your machine and run on another host.
by magicpointer 5y ago
Also go has the advantage of producing a single static binary. Easy to build on your machine and run on another host.
- berkes 5y agoWhich is why I'm writing most of my tooling in Rust. Deployment or installation is just one scp away. not rewriting, just when It needs large refactoring, or is currently a mess, or brand new.
- brundolf 5y agoAssuming you're deploying to the same OS/architecture that you're working from, otherwise you'd have to rebuild (which Rust makes easy to do, but still)
- Raed667 5y agoHow easy is it to cross-compile with Rust?
- brundolf 5y agoTrivial. All of the tooling, dependency management, linking, etc. is neatly bundled together under cargo. Just run "cargo build" for the current system, or specify one or more other architectures as arguments to get multiple binaries. Everything's statically-linked so you should be able to scp those wherever. Still, when we're talking about casual "scripts" even this extra step seems a little bit burdensome
- berkes 5y agoTrue. Though in all those cases, for me, all alternatives are just as bad or worse. Getting ansible running on a windows server is... unfortunate. Ensuring that your bash script runs on OSX is easier, but I've had lots of unexpected issues with tools like grep or find working just a tiny bit different. And so on.
- brundolf 5y agoNode scripts, even with dependencies, are pretty much 100% equivalent across all platforms :)