Closed folkertdev closed 6 days ago
What about z_off_t
?
off_t
is technically in std, but it's deprecated (and libc
explicitly mentioned as an alternative).
yes, this type is extremely annoying. The zlib-rs
crate has zero dependencies now for a release build, and libz-rs-sys
effectively only relies on this type. We could "inline" this type but it changes radically between targets.
we've ditched libc a while ago. We provide this definition
// In spirit this type is `libc::off_t`, but it would be our only libc dependency, and so we
// hardcode the type here. This should be correct on most operating systems. If we ever run into
// issues with it, we can either special-case or add a feature flag to force a particular width
pub type z_off_t = c_long;
so far that feature flag has not been needed.
we don't think we need it in practice
malloc
/free
std::ffi
C types