NetBSD port progress


Hi all, I noticed that some of the work on the NetBSD port is taking place on the netbsd mailing lists and some seems to be taking place on the Rust community portals. So I thought I would try to link the discussions together to make sure people are on the same page (literally?)

Currently NetBSD has version 0.11 in wip/rust and when 1.8 stable is release, it will be added under lang/rust. However, this looks like it will be using some cobbled together version of cargo.

On the rust side of things, there is a nightly build of rustc. But cargo doesn’t have a nightly build yet. But it should be available soon since @alexcrichton is doing a lot of work in this area including merging more support in cargo;

So, my understanding of the current state of play is that once cargo has snapshot builds then one can build Rust using ./configure --enable-rustbuild. Does this mean much of jperkins’ work is unneeded? Do you think Rust 1.8 will be available on NetBSD?

NB: I see @alexcrichton is doing lots of work in this area, but I didn’t see any mention of NetBSD in the triage of subteam report threads.


Thanks for the update!

In my spare time recently I’ve managed to get a gcc cross compiler from Linux to FreeBSD/NetBSD, and that’s helped unlock for us at least the ability to have infrastructure to produce nightly compilers and cargos. The effort here is somewhat ad-hoc as we’re not actually testing the produced binaries much. For example I don’t think NetBSD can produce many binaries until #32407 is merged, and the current cross-compiled Cargo binaries aren’t correctly hooking up OpenSSL to libcurl (but is hopefully fixed in #2519)

All that being said, if there’s anything we can do to help, please let us know! I’m hoping that having some nightly binaries of the compiler and Cargo will help get the ball rolling for more extensive testing and packaging. If we need to change anything on our end, however, it shoudl be easy to do so!

In terms of building Rust itself, you’ve got two options. With --enable-rustbuild you just need the nightly compiler matching the date in src/nightlies.txt, but without this option you’ll need to produce a stage0 snapshot matching src/snapshots.txt somehow. If you send a PR with a NetBSD snapshot I can upload it and make sure to enable the build for others.

Rust 1.8 probably won’t build out of the box on NetBSD unfortunately. Rust 1.10 will be the first to have a NetBSD release (via --enable-rustbuild that’s cross-compiled from Linux), and hopefully we can help flesh out bugs before then!

Hope that helps :slight_smile:



I pointed jperkins to this thread and he clarified that he is working on pkgsrc (which is associated with NetBSD) but his focus is on SmartOS, OS X, and Linux - not NetBSD.