4 ms·
Am I the only one who, while I think this is awesome utility and idea, find that unless you are Rust enthusiast, likelihood of using it is very low. I think th
by desireco42 12y ago
Am I the only one who, while I think this is awesome utility and idea, find that unless you are Rust enthusiast, likelihood of using it is very low.
I think there is a need for such utility, if it could be made in more portable fashion. I am not installing rust just for this.
- wtetzner 12y agoIf the binary could be distributed, then there's no reason you'd need to install Rust to use it.
- desireco42 12y agoOK, yes, that is what I would like to see. Maybe if it would show up in homebrew, then it would be good to install.
- glesica 12y agoIronically, doesn't Homebrew build everything from source? So in that case it would end up installing the Rust compiler before building the application... What you want is a binary download, it seems.
- icebraining 12y agoNo, homebrew supports pre-compiled binaries (known as bottles).
- bede 12y agoAlthough many packages are still source only, Homebrew has an initiative for packaging (or 'bottling') larger tools into binaries for convenience. It can always be overridden with --build-from-source
- cytzol 12y agoI'd really like for that to happen (compiling to a standalone binary is one of the reasons I picked Rust), but I have no idea how to go about doing it...
- geofft 12y agoYou could just distribute the executable you get when you run `cargo build`. rustc / cargo statically link the Rust standard library into the app, so it should work fine on a machine without Rust installed. It'll still dynamically link C libraries. One catch is that (especially if you're using C libraries other than libc, but sometimes with libc) you'll need to worry a little bit about forwards- and backwards-compatibility of those libraries. It's somewhat safer to find a semi-old distro like Ubuntu 12.04, build there, and see if it works everywhere newer. This is kind of a pain, and the long-term answer is to get Rust into the distros so that they can build software written in Rust. (This doesn't require rustc being installed on any machine other than the builders.) In the short term, a cross-distro package generator for binary crates sounds like a maybe-fun project....
- EugeneOZ 12y agoIsn't it possible to statically link C libraries too?
- steveklabnik 12y agoNot glibc, which is the issue here.
- EugeneOZ 12y agoThen not sure how its supposed to distribute Rust programms... Maybe some installer at least..
- steveklabnik 12y agoBasically every system has libc on it already, so it's not a big deal. Unless you build on a new system, and then distribute to an old one. Most people pick which systems they'd like to target, and build against the lowest available version.
- maemre 12y agoYou don't need to be a Rust enthusiast to install it if it enters to a repository for the package manager/distro you're using. However, we need an enthusiast (or maybe author) to do that first. It is as if I don't need to be a perl programmer to use ack over grep.
- hannob 12y agoMozilla plans to use rust for parts of its code by the end of this year. This isn't set in stone yet, but I'd expect rust code to be pretty standard soon.
- brson 12y agoThis comment inspired me to write this utility: https://github.com/brson/rustle https://github.com/brson/rustle It installs Cargo applications without requiring an existing Rust install. Instructions for installing exa are on the README. Since I wrote it in a few hours, using it may set your hard drive on fire.