{"id":18307906,"url":"https://github.com/semarie/openbsd-ziglibc","last_synced_at":"2026-05-08T09:34:24.199Z","repository":{"id":146896315,"uuid":"425958038","full_name":"semarie/openbsd-ziglibc","owner":"semarie","description":"build a ZIG_LIBC environment for Zig, targeting OpenBSD","archived":false,"fork":false,"pushed_at":"2021-11-08T19:05:11.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-12T02:40:56.437Z","etag":null,"topics":["openbsd","zig"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semarie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2021-11-08T18:56:06.000Z","updated_at":"2025-04-18T20:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"af339d9b-a744-44fa-a9a3-e8a75aa48149","html_url":"https://github.com/semarie/openbsd-ziglibc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/semarie/openbsd-ziglibc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semarie%2Fopenbsd-ziglibc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semarie%2Fopenbsd-ziglibc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semarie%2Fopenbsd-ziglibc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semarie%2Fopenbsd-ziglibc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semarie","download_url":"https://codeload.github.com/semarie/openbsd-ziglibc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semarie%2Fopenbsd-ziglibc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32775034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["openbsd","zig"],"created_at":"2024-11-05T16:05:50.666Z","updated_at":"2026-05-08T09:34:24.176Z","avatar_url":"https://github.com/semarie.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenBSD ZIG_LIBC support\n========================\n\nSimple shell script to build a `ZIG_LIBC` environment for [Zig](https://ziglang.org/) targeting [OpenBSD](https://www.openbsd.org/).\n\nUsage\n-----\n\n```\n$ ./build-ziglibc.sh\nusage: ./build-ziglibc.sh url output-dir\n```\n\n- *url* : URL pointing to OpenBSD sets.\n\n  Typical url to use: https://cdn.openbsd.org/pub/OpenBSD/*version*/*platform*/\n\n  Please note that OpenBSD officially support only the two last\n  released versions. Snapshots url is also valid for targeting\n  -current, but be aware that it is a moving target.\n\n  Refer to [supported platforms](https://www.openbsd.org/plat.html)\n  list from OpenBSD site web for the name used.\n\n- *output-dir* : where to put the environment.\n\n  Prefer absolute path: it will be used in generated `libc.conf` file.\n\n  The directory will be created.\n\n\nExamples of url\n---------------\n\n- OpenBSD 6.9 [amd64](https://www.openbsd.org/amd64.html) (x86_64 on Linux world)\n\n  https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/\n\n- OpenBSD -current [i386](https://www.openbsd.org/i386.html)\n\n  https://cdn.openbsd.org/pub/OpenBSD/snapshots/i386/\n\n\nUse the environment\n-------------------\n\n```\n$ ZIG_LIBC=path/to/amd64/libc.conf zig build-exe -target x86_64-openbsd -o tests/helloz tests/hello.zig\n$ ZIG_LIBC=path/to/amd64/libc.conf zig cc -target x86_64-openbsd -o tests/helloc tests/hello.c\n```\n\nMake shell wrapper\n------------------\n\nFor easy use of crosscompilation, you could create a shell wrapper\nnamed `x86_64-openbsd-cc`:\n\n```\n#!/bin/sh\nexec env ZIG_LIBC=path/to/amd64/libc.conf zig cc -target x86_64-openbsd \"$@\"\n```\n\nAnd do the same for `x86_64-openbsd-c++`, `x86_64-openbsd-ar`, …\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemarie%2Fopenbsd-ziglibc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemarie%2Fopenbsd-ziglibc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemarie%2Fopenbsd-ziglibc/lists"}