Replace libc dependency with core::ffi::*
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 170
- Forks
- 43
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Description
Presently rustls-ffi takes a dependency on the libc crate for the following imports:
size_tc_voidc_charc_uintc_intEINVALEIO
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_tis unstable (upstream tracking issue). -
EINVALandEIOaren'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 replace libc with core::ffi::* and manually defined EINVAL/EIO.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by reviewing rustls-ffi's current libc imports and the stabilization status of core::ffi::c_size_t. Check how platform-gated EINVAL and EIO constants would be defined, and confirm libc can be removed without changing the FFI types or error behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100