{"id":28108758,"url":"https://github.com/kassane/zcc-d","last_synced_at":"2026-06-08T16:33:57.356Z","repository":{"id":293152106,"uuid":"982978599","full_name":"kassane/zcc-d","owner":"kassane","description":"D library for build scripts to compile C/C++ code using zig toolchain","archived":false,"fork":false,"pushed_at":"2025-05-20T17:08:35.000Z","size":24,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T14:34:23.698Z","etag":null,"topics":["cross-compile","d","dlang","zig"],"latest_commit_sha":null,"homepage":"http://zcc.dub.pm","language":"D","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/kassane.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-05-13T17:32:29.000Z","updated_at":"2025-11-09T05:52:22.000Z","dependencies_parsed_at":"2025-05-14T00:36:56.603Z","dependency_job_id":null,"html_url":"https://github.com/kassane/zcc-d","commit_stats":null,"previous_names":["kassane/zcc-d"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kassane/zcc-d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Fzcc-d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Fzcc-d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Fzcc-d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Fzcc-d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kassane","download_url":"https://codeload.github.com/kassane/zcc-d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kassane%2Fzcc-d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34071656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cross-compile","d","dlang","zig"],"created_at":"2025-05-14T02:15:47.563Z","updated_at":"2026-06-08T16:33:57.351Z","avatar_url":"https://github.com/kassane.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zcc-d\n\n[![CI Build](https://github.com/kassane/zcc-d/actions/workflows/ci.yml/badge.svg)](https://github.com/kassane/zcc-d/actions/workflows/ci.yml)\n![Latest release](https://img.shields.io/github/v/release/kassane/zcc-d?include_prereleases\u0026label=latest)\n[![Static Badge](https://img.shields.io/badge/v2.111.0%20(stable)-f8240e?logo=d\u0026logoColor=f8240e\u0026label=frontend)](https://dlang.org/download.html)\n[![License](https://img.shields.io/github/license/kassane/zcc-d)](https://github.com/kassane/zcc-d/blob/master/LICENSE)\n\n\nA D library for building C/C++ code using Zig as a cross-compilation toolchain, inspired by [cc-rs](https://github.com/rust-lang/cc-rs) and [cargo-zigbuild](https://github.com/rust-cross/cargo-zigbuild).\n\n## Features\n\n- Cross-compilation support via Zig's C/C++ compiler\n- Target triple and CPU architecture configuration\n- Automatic C++ mode detection based on file extensions\n- Flag transformation and filtering\n- Build output logging\n- Exception handling for build failures\n\n## Requirements\n\n- [D compiler](https://dlang.org/download.html)\n- [Zig compiler](https://ziglang.org/download)\n- [dub](https://github.com/dlang/dub/releases) or [redub](https://github.com/MrcSnm/redub/releases) package manager\n\n## Installation\n\n```bash\ndub add zcc\n```\n\n## Usage\n\n**library**\n\n```d\n// Compile C/C++ code\nauto b = new Builder();\n\n// Use `zig cc` or `zig c++`\nb.file(\"source.cpp\")  // Auto-detects C++ mode\n .setTargetTriple(\"aarch64-linux-gnu\")\n .setCpu(\"generic\")\n .addArg(\"-Wall\")\n .execute();\n\n// Build library\nauto lb = new Builder();\n\n// use `zig build-lib -lc` or `zig build-lib -lc++`\nlb.files([\"source.cpp\", \"resource.cc\"])  // Auto-detects C++ mode\n .setTargetTriple(\"riscv64-linux-gnu\")\n .setCpu(\"baseline\")\n .addArg(\"-Wall\")\n .buildLibrary(\"libname\");\n```\n\nSee more in [samples](samples).\n\n**executable**\n\n```console\ndub run zcc:cc -- \u003cclang-flags\u003e \u003csource-files\u003e\n```\n\n# Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Fzcc-d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkassane%2Fzcc-d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkassane%2Fzcc-d/lists"}