HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
atilaneves
dpp
D2018–2021
atilaneves / dpp

dpp

Directly include C headers in D source code

9Distinct people
13Mentions
0Explicit recommenders
245GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Directly include C headers in D source code

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 1:56:48 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2018-06-20 19:51:31 UTC to 2021-03-24 17:11:38 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC606
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC312

What Hacker News says

3 sources
They've been putting a lot of work into an experimental automatic C++ header generator lately. https://dlang.org/changelog/2.096.0.html#dtoh-improvements Each changelog for the last good handful has seen a lot of work in this area. I recently had to write and learn a bit of C++ for the first time, and tried at all costs to avoid it (FFI/interop from Rust or D). I wound up biting the bullet and writing C++ but I learned a lot about FFI in general and how interop works, plus your options available in both languages. D has this new experimental C++ header generator (which is exciting), plus D has always had: extern (C++) Which is capable of directly linking + invoking most C++ things (except constructors/destructors, it can't handle those, you need a function which calls the constructor from within C++) just given a type definition. Then
Read the rest
you have "d++", which lets you "#include" C/C++ headers. Under the hood tries to run an automatic syntax conversion. It can't handle <std> but for simple code it works and can spit out the equivalent D. https://github.com/atilaneves/dpp Also you've got "dstep", which is "A tool for converting C and Objective-C headers to D modules" https://github.com/jacob-carlborg/dstep And finally you have the somewhat abandoned (but as far as I know mostly functional) Calypso, which is a fork of the LLVM-based D compiler that supports direct interop with C++. It's a pain to build though, haven't gotten around to trying to build it, but it does look wicked cool: https://github.com/Syniurge/Calypso pragma (cppmap, "cppheader.h"); // tells Clang to parse cppheader.h but do not import anything import (C++) NamespaceA.Class1; // imports NamespaceA::Class1 import (C++) NamespaceA; // imports the full namespace import (C++) *; // imports the entire translation unit So I am hopeful about the future of the relationship between C++ and D. I would really have loved to have not written that C++ lol.
In D 2.096 and other news

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.