nix
nix copied to clipboard
Futex
Add futex interface.
Does https://github.com/m-ou-se/linux-futex meet your needs?
Does https://github.com/m-ou-se/linux-futex meet your needs?
This is a useful reference, thank you. I do think this functionality should be included in nix.
I do think this functionality should be included in nix.
I don't disagree in principle, but I'd like to see nix's support provide some value-add compared to prior art. For example, Mara's crate only (appears to) supports Linux futexes. It'd be nice if nix supported the BSD variants as well.
I do think this functionality should be included in nix.
I don't disagree in principle, but I'd like to see nix's support provide some value-add compared to prior art. For example, Mara's crate only (appears to) supports Linux futexes. It'd be nice if nix supported the BSD variants as well.
I haven't implemented BSD since it is not personally useful to me. I think if someone needs this they can implement it. This is still a significant value add to nix and I would also argue my implementation is smaller and simpler than linux-futex and this I would argue makes it better.
I still don't understand what advantage this PR has over the existing linux-futex crate.
I still don't understand what advantage this PR has over the existing linux-futex crate.
The advantage is having it in Nix and it aligning with the design of Nix.
The point of nix is to provide wrappers to Unix-like systems..
Providing bindings to Unix-like systems except for functionality that is already covered by other crates would mean removing like 80% of already implemented functionality.
The point of nix is to provide wrappers to Unix-like systems..
The point of Nix is to provide idiomatic zero-cost access to Unix system APIs. But providing access to ALL Unix system APIs isn't a goal. Nor is it productive to duplicate work that others have already done. That wastes developer resources and increases our maintenance burden. If another crate already does a good job, then there's no reason why we should need to, too.
The point of nix is to provide wrappers to Unix-like systems..
The point of Nix is to provide idiomatic zero-cost access to Unix system APIs. But providing access to ALL Unix system APIs isn't a goal. Nor is it productive to duplicate work that others have already done. That wastes developer resources and increases our maintenance burden. If another crate already does a good job, then there's no reason why we should need to, too.
If this is really the path Nix pursues it should be documented:
Nix seeks to provide friendly bindings to various nix platform APIs (Linux, Darwin, ...) except where existing safe bindings exist in the eco-system.
*e.g. Nix does not implement an interface to futex because https://github.com/m-ou-se/linux-futex exists.
I think this sounds absurd. I do not agree with this, I see the reasoning but I think it is shallow. I could for instance post an issue on half the functionality on Nix saying it should be removed since decent alternatives exist. I could also leave this comment on most currently open PRs saying a decent alternative exists that support this. Following this almost completely eliminates the purpose of Nix.
A key value is that Nix covers many things, that I don't need 30 different crates to cover each small component. That Nix offers an interface to all this functionality that reasonably neatly fits together.