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

CI Build Latest release Static Badge License

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

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.

Authors:
  • Matheus C. França
Sub packages:
zcc:cc
Dependencies:
none
Versions:
0.1.9 2025-May-20
0.1.8 2025-May-20
0.1.7 2025-May-17
0.1.6 2025-May-15
0.1.5 2025-May-14
Show all 10 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 7 downloads this month

  • 208 downloads total

Score:
0.2
Short URL:
zcc.dub.pm