Skip to content

Split libc into types and impl crates #881

Closed
@vi

Description

@vi

C libraries (including system ones like glibc or musl) change, but C fundamentals stay put.

I expect many FFI bindings may rely only on fundamental language-provided types like size_t and c_void, not on specific library-provided ones like sockaddr or FILE.

To bring more stability to such use case, libc may be split into something like libc-pure with only type-level things that are expected to change when C as a language changes and libc-sys with everything else. libc itself is just a bunch of re-exports.

Exact splitting line and naming details is left to further discussion. A simple no-brainer constraint maybe that unix:notbsd:fexecve and c_int should appear on opposite sides of the barricades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions