Better HN
topnewbestaskshowjobs
Log inSign up

Comment

by magicpointer · 5y ago · 0 comments

Also go has the advantage of producing a single static binary. Easy to build on your machine and run on another host.
Comments
berkes5y ago
Which 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.
brundolf5y ago
Assuming 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)
berkes5y ago
True.

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.

brundolf5y ago
Node scripts, even with dependencies, are pretty much 100% equivalent across all platforms :)
Raed6675y ago
How easy is it to cross-compile with Rust?
brundolf5y ago
Trivial. 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