On Tue, Nov 20, 2018 at 09:00:23PM +0100, Samuel Thibault wrote: > Hello, > > Josh Triplett, le lun. 05 nov. 2018 21:02:32 -0800, a ecrit: > > Speaking with an upstream Rust hat on in addition to a Debian hat: > > what could Rust do to make life easier for porters? > > After Adrian's announce I tried to have a brief look at the Hurd port. > > I appreciated a *lot* that the Debian cross-bootstrap way is documented > and works nicely :) > > I am however a bit overwhelmed by the task of filling the > src/liblibc/src/ os-specific .rs files which basically describe each and > every structure, function macro etc. provided by the system. Is there > no way to generate these from the glibc headers? Writing them by hand > is both tedious and error-prone, but I didn't find a porting guide that > would describe another way.
I'm not an expert in that mechanism, but my understanding is that the vast majority is shared among multiple systems. I'd suggest starting with src/liblibc/libc-test and trying to get those tests running on Hurd, and then doing test-driven development until all the tests pass. There probably *should* be a way to autogenerate these, but I don't think there is. But I wouldn't be surprised if you could rely *heavily* on the Linux glibc support.