{"id":29470447,"url":"https://github.com/lygaen/zig-libc","last_synced_at":"2025-07-14T12:03:00.955Z","repository":{"id":304550022,"uuid":"1019109965","full_name":"Lygaen/zig-libc","owner":"Lygaen","description":"A rewrite of the LIBC library in Zig !","archived":false,"fork":false,"pushed_at":"2025-07-13T19:30:38.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T21:24:06.387Z","etag":null,"topics":["libc","library","zig","ziglang"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lygaen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-13T18:56:00.000Z","updated_at":"2025-07-13T20:58:06.000Z","dependencies_parsed_at":"2025-07-13T21:24:08.132Z","dependency_job_id":"98cbbcb9-194f-4374-aa36-40e5aafa12c3","html_url":"https://github.com/Lygaen/zig-libc","commit_stats":null,"previous_names":["lygaen/zig-libc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Lygaen/zig-libc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lygaen%2Fzig-libc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lygaen%2Fzig-libc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lygaen%2Fzig-libc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lygaen%2Fzig-libc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lygaen","download_url":"https://codeload.github.com/Lygaen/zig-libc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lygaen%2Fzig-libc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265288584,"owners_count":23741210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libc","library","zig","ziglang"],"created_at":"2025-07-14T12:02:16.863Z","updated_at":"2025-07-14T12:03:00.925Z","avatar_url":"https://github.com/Lygaen.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZIG LIBC\nA rewrite of the LIBC library in Zig !\nCurrently in a very, *very* alpha state, doesn't do a lot of things.\nIt aims to **ONLY** depend on zig's std.\nIf the behavior is different from `musl`/`glibc`/... then it is a **bug**. It aims for seamless integration / replacement.\nIt also has a **tracing** feature to allow you to follow your libc calls.\n\n## Usage / Build\nExemple usage can be found in the `tests/` directory in the form of `*.c` files. Basically, use it like libc :D\n\n### Build\nFor building, use the following command :\n```sh\nzig build\n```\nIt will produce the following structure in the `zig-out` directory :\n```tree\n.\n├── include\n│   ├── assert.h\n│   ├── stddef.h\n│   └── ...\n└── lib\n    └── libzig_libc.a\n```\n\n### Tests\nIf you want to run and build the tests, do :\n```sh\nzig build test\n```\nwhich will generate :\n```tree\n.\n├── bin\n    └── hello_world\n    └── ...\n```\n\nYou can pass additional arguments to **all** the tests using :\n```sh\nzig build test -- arg1 arg2 ...\n```\n\n### Configuration\nAdditional parameters can be given at build time to modify the behavior of the library.\n\n#### Tracing\n```sh\nzig build -Dtrace\n```\nWill output tracing to `stderr` which will satisfy the format :\n```\n[TRACE] LIBC '\u003cfunction\u003e' : \u003cmessage\u003e\n```\nThis will clutter quite a lot your terminal but hopefully will help you trace back the error.\n\n## Why ?\nThere a multiple reasons why I wanted to create this project :\n  - The zig ecosystem still has a strong dependency on libc, which needs to then be distributed on all machines\n  - It is a great project to learn various things\n  - The current \"ziglibc\" project is dead (last commit \u003e2y ago) and has many drawbacks and bad tooling\n  - I feel like I can improve on the current solutions, and I want to try make an impact / help the zig ecosystem !\n\nAll these mad reasons have lead me to the most reasonable choice : write the entire LIBC in zig.\n\n## Acknowledgements\nA lot of inspiration and help was taken from the following projects :\n  - [CPP Reference - Header page](https://cppreference.com/w/c/header.html)\n  - [Jonathan Marler's ziglibc](https://github.com/marler8997/ziglibc) as well as [his talk](https://www.youtube.com/watch?v=1N85yU6RMcY)\n  - [Musl's LIBC implementation](https://github.com/kraj/musl)\n  - and more...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flygaen%2Fzig-libc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flygaen%2Fzig-libc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flygaen%2Fzig-libc/lists"}