Skip to content

provide common implementations where applicable for libc functions #2879

@andrewrk

Description

@andrewrk

Some libc functions can obviously share a common implementation. For example, right now, musl, mingw, the zig standard library all have independent implementations of the math functions, such as sqrt.

Instead, the canonical implementation should be in Zig, and even when providing musl or mingw libcs, the zig code should be built and used to fulfill those dependencies.

Other examples of functions would be memcpy and strcmp.

Functions that would be tricky to have common implementations would be, e.g. fopen. But that's worth investigating as well.

Instructions for contributing to this effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.libcIssues related to libzigc and Zig's vendored libc code.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions