Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



This comment inspired me to write this utility: 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.


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


If the binary could be distributed, then there's no reason you'd need to install Rust to use it.


I'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...


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


Isn't it possible to statically link C libraries too?


Not glibc, which is the issue here.


Then not sure how its supposed to distribute Rust programms... Maybe some installer at least..


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


OK, yes, that is what I would like to see. Maybe if it would show up in homebrew, then it would be good to install.


Ironically, 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.


Although 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


No, homebrew supports pre-compiled binaries (known as bottles).


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: