You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rustix has this pattern where it defines flags types in both src/backend/linux_raw/*/types.rs and src/backend/libc/*/types.rs and then publicly exports those types from src/*/*.rs. This leads to a fair amount of duplication.
In many cases, espeically for flags corresponding to Linux-specific features, it would work to just define the public type in src/*/*.rs using the values of c::* constants which we could arrange to be defined by both backends, and it'd have less overall duplication.
It'd be nice to factor out the flags values in this way.
The text was updated successfully, but these errors were encountered:
This will also involve eliminating some differences in types between the backends, where currently the linux_raw backend uses u32 for many of its flags types due to how bindgen works, and the libc backend uses i32 due to how C works.
As of #701, the libc branch uses u32 for flags types. Some of the common code for flags is factored out, though there's more to do, though now, it won't require a semver bump.
Rustix has this pattern where it defines flags types in both src/backend/linux_raw/*/types.rs and src/backend/libc/*/types.rs and then publicly exports those types from src/*/*.rs. This leads to a fair amount of duplication.
In many cases, espeically for flags corresponding to Linux-specific features, it would work to just define the public type in src/*/*.rs using the values of
c::*
constants which we could arrange to be defined by both backends, and it'd have less overall duplication.It'd be nice to factor out the flags values in this way.
The text was updated successfully, but these errors were encountered: