Hacker News new | ask | show | jobs
by berkes 1896 days 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.

1 comments

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)
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.

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