zcc 0.1.3
D library to build C/C++ code using zig
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
zcc-d
A D library for building C/C++ code using Zig as a cross-compilation toolchain, inspired by cc-rs and cargo-zigbuild.
Features
- Cross-compilation support via Zig's C/C++ compiler
- Target triple and CPU architecture configuration
- Automatic C++ mode detection based on file extensions
- Flag transformation and filtering
- Build output logging
- Exception handling for build failures
Requirements
- D compiler
- Zig compiler
- DUB or REDUB package manager
Installation
dub add zcc
Usage
library
// Basic usage
auto b = new Builder();
b.addArgs(["-c", "source.c", "-o", "output.o"]);
// Cross-compilation
b.setTargetTriple("aarch64-linux-gnu");
b.setCpu("generic");
// C++ mode
b.addArg("source.cpp"); // Automatically switches to C++ mode
// Running the build
b.execute();
executable
dub run zcc:cc -- <clang-flags> <source-files>
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
- 0.1.3 released 2 days ago
- kassane/zcc-d
- MIT
- Authors:
- Sub packages:
- zcc:cc
- Dependencies:
- none
- Versions:
-
0.1.6 2025-May-15 0.1.5 2025-May-14 0.1.4 2025-May-14 0.1.3 2025-May-14 0.1.2 2025-May-14 - Download Stats:
-
-
1 downloads today
-
143 downloads this week
-
143 downloads this month
-
143 downloads total
-
- Score:
- 1.7
- Short URL:
- zcc.dub.pm