rust-lang / prev.rust-lang.org

The previous Rust website. The current website's code is at https://github.com/rust-lang/www.rust-lang.org.
https://prev.rust-lang.org
Apache License 2.0
151 stars 340 forks source link

Rust runs on OpenBSD too. #1101

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi!

Your website says: "I don't recognize your platform. Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD."

Not true:

mazocomp$ pkg_info rust
Information for https://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/rust-1.25.0p0.tgz

Comment:
compiler for Rust Language

Description:
Rust is a systems programming language that runs blazingly fast, prevents
almost all crashes, and eliminates data races.

Featuring:
- zero-cost abstractions
- move semantics
- guaranteed memory safety
- threads without data races
- trait-based generics
- pattern matching
- type inference
- minimal runtime
- efficient C bindings

Maintainer: Sebastien Marie <semarie@online.fr>

WWW: http://www.rust-lang.org/

mazocomp$

Offtopic: Rust required patches to run on OpenBSD: https://github.com/openbsd/ports/tree/master/lang/rust/patches

brson commented 6 years ago

Thanks for the tip. I'm not sure how to integrate this information into the website though, since the official Rust releases still don't seem to support OpenBSD. I guess it would be best if the OpenBSD patches were upstreamed, and the builds added to the release process.

Otherwise, I guess the website could add OpenBSD detection and direct people to OpenBSD-specific instructions and/or the "unrecognized" instructions you refer to could be augmented to have OpenBSD-specific instructions, and/or the "other installers" page could be augmented with OpenBSD-specific info.

It's an awkward situation.

Any changes here should be applied to rustup.rs as well.

brson commented 6 years ago

FWIW I think the "other installers" page should discuss 3rd-party installation methods like macports, distros, etc. so that would be a good place to discuss OpenBSD's package. The "unrecognized option" could include a link to the "other installers" page indicating there may be relevant 3rd-party options.

ghost commented 6 years ago

@brson Well, FreeBSD and NetBSD patches are not upstreamed too: https://svnweb.freebsd.org/ports/head/lang/rust/files/ http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/rust/patches/

It is best and most reliable to install via ports/packages (especially at OpenBSD system ABI loving to break binary compatibily is annoying when you run snaphots). At OpenBSD, Rust can be installed as:

# cd /usr/ports/lang/rust
# make -j `sysctl hw.ncpu` install clean
or
# pkg_add rust

About official support, didn't Sebastien Marie (Rust port's maintainer) contact you?

ghost commented 6 years ago

@brson Anyway, ports is not recommended because it is just wasting time to compile, so it is best to install it as package. At FreeBSD and DragonFlyBSD:

# pkg ins rust

At OpenBSD:

# pkg_add rust

At NetBSD:

# pkg_add rust

or

# pkgin install rust
hboetes commented 4 years ago

Here are the patches OpenBSD ports applies to make rust build on OpenBSD: https://github.com/openbsd/ports/tree/master/lang/rust/patches

Please consider taking a look. Thanks!

skade commented 4 years ago

@hboetes this is the archived repository of the old rust-lang website. We generally prefer active upstreaming of patches from projects themselves, it's usually the better direction to work in: they usually know better what they need upstream and what not.

That being said: we'd be very happy to assist in the process!

hboetes commented 4 years ago

@skade, OK, thanks for your reply.