{"id":23611038,"url":"https://github.com/kubkon/bold","last_synced_at":"2025-05-16T09:04:20.804Z","repository":{"id":43365903,"uuid":"332143263","full_name":"kubkon/bold","owner":"kubkon","description":"bold: the bold linker","archived":false,"fork":false,"pushed_at":"2025-05-15T22:07:42.000Z","size":4529,"stargazers_count":316,"open_issues_count":4,"forks_count":25,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-15T23:18:48.197Z","etag":null,"topics":["linker","zig","zig-package"],"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/kubkon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["kubkon"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-01-23T06:25:16.000Z","updated_at":"2025-05-15T22:07:35.000Z","dependencies_parsed_at":"2023-11-15T11:39:19.657Z","dependency_job_id":"23173f3f-09e9-4d25-af05-1b2756f84f3c","html_url":"https://github.com/kubkon/bold","commit_stats":{"total_commits":2006,"total_committers":7,"mean_commits":"286.57142857142856","dds":"0.046859421734795625","last_synced_commit":"8d85ffd0152e09b79149d856b78817117ccc2e61"},"previous_names":["kubkon/emerald","kubkon/bold"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fbold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fbold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fbold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fbold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubkon","download_url":"https://codeload.github.com/kubkon/bold/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254437102,"owners_count":22070981,"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":["linker","zig","zig-package"],"created_at":"2024-12-27T16:12:43.461Z","updated_at":"2025-05-16T09:04:20.798Z","avatar_url":"https://github.com/kubkon.png","language":"Zig","readme":"# bold - the *bold* linker\n\n\u003e Bold used to be emerald, but due to time constraints and other commitments I am unable to develop and maintain the other drivers.\n\u003e Emerald now lives in another repo -\u003e [kubkon/emerald-old](https://github.com/kubkon/emerald-old).\n\n`bold` is a drop-in replacement for Apple system linker `ld`, written fully in Zig. It is on par with the LLVM lld linker, \nfaster than the legacy Apple ld linker, but slower than the rewritten Apple ld linker. Some benchmark results between the linkers \nwhen linking stage3-zig compiler which includes linking LLVM statically:\n\n```sh\n$ hyperfine ./bold.sh ./ld.sh ./ld_legacy.sh ./lld.sh\nBenchmark 1: ./bold.sh\n  Time (mean ± σ):     978.5 ms ±   9.9 ms    [User: 3083.2 ms, System: 949.2 ms]\n  Range (min … max):   967.6 ms … 998.7 ms    10 runs\n\nBenchmark 2: ./ld.sh\n  Time (mean ± σ):     439.0 ms ±   5.4 ms    [User: 1769.9 ms, System: 273.1 ms]\n  Range (min … max):   432.2 ms … 447.9 ms    10 runs\n\nBenchmark 3: ./ld_legacy.sh\n  Time (mean ± σ):      1.986 s ±  0.021 s    [User: 3.100 s, System: 0.221 s]\n  Range (min … max):    1.968 s …  2.030 s    10 runs\n\nBenchmark 4: ./lld.sh\n  Time (mean ± σ):      1.043 s ±  0.009 s    [User: 1.206 s, System: 0.210 s]\n  Range (min … max):    1.031 s …  1.060 s    10 runs\n\nSummary\n  ./ld.sh ran\n    2.23 ± 0.04 times faster than ./bold.sh\n    2.38 ± 0.04 times faster than ./lld.sh\n    4.52 ± 0.07 times faster than ./ld_legacy.sh\n```\n\nIn the results\n* `bold.sh` calls `bold` with all the required inputs and flags\n* `ld.sh` calls the rewritten Apple linker\n* `ld_legacy.sh` calls `ld -ld_classic` the legacy Apple linker\n* `lld.sh` calls LLVM lld linker\n\ntl;dr `bold` is currently directly competing with LLVM lld but behind the Apple ld linker.\n\n## Quick start guide\n\n### Building\n\nYou will need Zig 0.14.0 in your path. You can download it from [here](https://ziglang.org/download/).\n\n```\n$ zig build -Doptimize=ReleaseFast\n```\n\nYou can then pass it to your system C/C++ compiler with `-B` or `-fuse-ld` flag (note that the latter is supported mainly/only by clang):\n\n```\n$ cat \u003c\u003cEOF \u003e hello.c\n#include \u003cstdio.h\u003e\n\nint main() {\n    fprintf(stderr, \"Hello, World!\\n\");\n    return 0;\n}\nEOF\n\n# Using clang\n$ clang hello.c -fuse-ld=bold\n\n# Using gcc\n$ gcc hello.c -B/path/to/bold\n```\n\n### Testing\n\nIf you'd like to run unit and end-to-end tests, run the tests like you'd normally do for any other Zig project.\n\n```\n$ zig build test\n```\n\n## Contributing\n\nYou are welcome to contribute to this repo.\n","funding_links":["https://github.com/sponsors/kubkon"],"categories":["Zig","Fundamentals"],"sub_categories":["Linker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fbold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubkon%2Fbold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fbold/lists"}