Open cpu opened 7 months ago
Presently rustls-ffi takes a dependency on the libc crate for the following imports:
libc
size_t
c_void
c_char
c_uint
c_int
EINVAL
EIO
It looks like the core::ffi module has many of these same defines, and could potentially let us drop an external dependency.
core::ffi
Blockers:
core::ffi::c_size_t
I propose we wait for c_size_t to stablize and then replace libc with core::ffi::* and manually defined EINVAL/EIO.
c_size_t
core::ffi::*
Presently rustls-ffi takes a dependency on the
libc
crate for the following imports:size_t
c_void
c_char
c_uint
c_int
EINVAL
EIO
It looks like the
core::ffi
module has many of these same defines, and could potentially let us drop an external dependency.Blockers:
core::ffi::c_size_t
is unstable (upstream tracking issue).EINVAL
andEIO
aren't present; I think we would need our own platform-gated constants for these.I propose we wait for
c_size_t
to stablize and then replacelibc
withcore::ffi::*
and manually definedEINVAL
/EIO
.