Open eeyun opened 6 years ago
Are there any users who need Nix on Illumos? If so, I would accept a PR for Illumos support.
We don't compile-test on those platforms now I don't think. And for new platforms to be "added" I see that as a requirement. If we can run tests in a VM that's even better. I don't want to add support and fix things and then have it break 1 PR later because we don't have at least compilation testing working.
And what are the target tuples for the platforms you'd want to add. I assume that these OSes are treated as identical from the Rust compiler's perspective.
As far as any nix users who need it - that would be me! Though currently only for a hobby effort.
Yep all of "solaris" is treated exactly the same by the compiler. I've only been working with illumos in OpenIndiana and OmniOS but some random attempts with Solaris 11 seem to also work fairly identically, I have no interest personally in SPARC or the like. My initial "need" is just around the "x86_64-sun-solaris" target.
RE Testing: Running an Illumos VM should be totally possible on any virtualization platform, basically, a staged image would need to get created. I'll admit I haven't looked through all of the docs in the repo so I don't know what your testing strategies are as of today.
As a side note it would likely be a non-trivial effort. The first step actually starts with exposing a significant number of libc consts in the libc crate first (or really simultaneously). This feature request can't really even be completed until those changes were to get merged.
Yeah, libc definitely comes first. After that, I would accept a PR to add Illumos support as long as we could compile-test it on Travis in CI. As with NetBSD, I wouldn't insist on running the tests.
Yeah, I'd expect that libc
will need an absurd amount of cleanup. What I'd suggest is the following:
x86_64-sun-solaris
for libc
as a can-fail targetlibc
so that it compiles properlyx86_64-sun-solaris
target to be cant-failThe above can be done in parallel with the same process done for nix
Still very much need support for x86_64-sun-solaris target.
papertigers added missing pieces in libc needed by nix
I have also hacked nix to a state where it can compile and I was able to successfully build fd-find on illumos. It seems to function correctly and all of its tests pass via cargo test.
It looks like cross has added supported for x86_64-sun-solaris (build only), which is cool. I think we can add that target to Nix. @priyadarshan care to submit a pr?
Thanks for update. Pinging @papertigers who has been working on libc and nix crate changes. (It is also thanks to him that OmniOS can offer fid-find.)
I have most of the work done. It required some updates to the libc crate for the CMSG_ bits that have been integrated, though a new version of the libc crate hasn't been cut yet. It's currently here: https://github.com/jasonbking/nix/tree/illumos but still needs openpty and forkpty -- they don't exist in libc on illumos, though @jclulow said he was going to try to take a shot at adding an implementation to the libc crate.
So the work is progressing, but probably not quite ready yet..
Now that illumos/solaris users are going to have an actively supported rustc/cargo binary it might be nice for this crate to support it's bindings.
As a side note - I'm happy to contribute a PR that adds support for illumos if the maintainers feel like they would accept a PR to add solaris support but I didn't want to start in on the effort if adding a new platform is not something y'all are interested in!