-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Policy question: changes for platform consistency #3839
Comments
@joshtriplett do you have any thoughts here? |
Note: the Hurd C API also provides the |
And also, in the |
(put another way: if rust could support different names for the same field, we could ideally provide both |
Are there any news on this? |
Personally I'm against it. Attempting to provide compatibility shims in libc would obscure the crate's true purpose. We've tried the same thing in the Nix crate a few times, and it never turned out well. Compatibility layers are best built at a higher level than this. |
We have a couple PRs proposing something that makes platforms more consistent, but isn't exactly true to the C API. Two examples:
stat
has a fieldst_dev
on almost all platforms, but on Hurd it isst_fsid
. hurd: Fix st_dev name #3785 proposes renaming this field tost_dev
.The reasoning for these suggestions is that it is pretty unlikely for library authors to special case Hurd or BSD, meaning builds will just break on these platforms. By making something consistent with Linux, it is more likely that things work out of the box without library authors needing to test these less common platforms.
I think an argument could be made in either direction, so I am bringing this up as a more general policy question.
The text was updated successfully, but these errors were encountered: