2 ms·
Others have already commented that you don't need a rust compiler for this. But it's also worth noting that compiling Rust programs is typically much more strai
by nicoburns 5y ago
Others have already commented that you don't need a rust compiler for this. But it's also worth noting that compiling Rust programs is typically much more straightforward than compiling C programs, even if you account for installing the Rust compiler as part of the process.
The process would be:
- Run the `curl | bash` command from https://rustup.rs/ https://rustup.rs/ to install rust via rustup
- If you have a non-standard shell configuration that rustup can't detect, then add `~/.cargo/bin` to your PATH.
- Clone the git repository containing the program you wish to compile
- Run `cargo build --release` in the source directory.
That's it, and that will work across all major platforms and almost all Rust programs.
- enriquto 5y agorustup: unrecognized OS type: OpenBSD EDIT: googling around, it seems to be possible to build rust programs for openbsd, but it does not really work "out of the box". May try to install it this weekend.
- nicoburns 5y agoAh, OpenBSD looks like a bit of an exception in terms of platform support. FreeBSD and NetBSD both have Tier 2 (which is really the minimum level you want for a compiler host platform), but not OpenBSD.