HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Syniurge
Calypso
D2017–2021
Syniurge / Calypso

Calypso

LDC fork to experiment direct interfacing with C++

4Distinct people
7Mentions
0Explicit recommenders
137GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

LDC fork to experiment direct interfacing with C++

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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM 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 year7 dated mentions

Observed mentions: 2017-12-10 17:54:04 UTC to 2021-05-10 11:43:54 UTC.

01232017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 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
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202

What Hacker News says

7 sources
Context: Walter Bright created the first native C++ compiler, Zortech C++. This pull request actually implements its own C compiler! For Walter, considering he's implemented C++98 alone, implementing C must be nothing :) He implemented the ANSI C compiler here in just 5 days. Semi-related project, using libclang to import C++ directly (with C++ templates and all the other features, regular D has C++ linking and exception support built-in): https://github.com/Syniurge/Calypso Some quotes from the forum https://forum.dlang.org/post/s7a37h$2bbv$1@digitalmars.com : - Writing a C preprocessor is a nightmare. Fortunately, I already did that https://github.com/facebookarchive/warp and we can use it if we choose. - The D code will be able to inline C code, and even CTFE it. - There are a lot of wacky C extensions out there. We only need to implem
Read the rest
ent currently used ones (not the 16 bit stuff), and only the stuff that appears in C headers. - Without a C compiler, we're stuck with, wedded to, and beholden to libclang. I wouldn't be surprised that the eventual cost of adapting ourselves to libclang will exceed the cost of doing our own C compiler.
In Adding ANSI C11 C compiler to D so it can import and compile C files directly
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
Dlang is a better C. DMD, the reference compiler for Dlang, can also compile and link with C programs. It can even compile and link with C++03 programs. It has manual memory management as well as garbage collection. You could call it hybrid memory management. You can manually delete GC objects, as well as allocate GC objects into manually allocated memory. The Zig website says "The reference implementation uses LLVM as a backend for state of the art optimizations." However, LLVM is consistently 5% worse than the GCC toolchain at performance across multiple benchmarks. In contrast, GCC 9 and 10 officially support Dlang. Help us update the GCC D compiler frontend to the latest DMD. Help us merge the direct-interface-to-C++ into LLVM D Compiler main. https://github.com/Syniurge/Calypso Help us port the standard library to WASM.
In Zig cc: A drop-in replacement for GCC/Clang
D can also use C and C++ libraries (including templates), and with gcc and llvm it covers pretty much all the same architectures/platforms as nim. > with C++ the things are not so simple, because of the non standard ABI, across different compilers. With templates the things are becoming even more complicated. For now the easiest and the most reliable way to use C++ libraries from another language is to compile it to C++ This turns out not to be true. The only way to parse C++ is to use a C++ compiler; there is no negotiability there. However you can, as calypso[1] and dpp[2] (latter is not ready for primetime yet) do, use the c++ compiler to parse the c++ and then emit bindings in another language. As for ABI, there are really only two ABIs: msvc (which microsoft uses), and itanium (which everyone else uses). And D already implements
Read the rest
In My Vision of D’s Future

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.