Calypso: Direct and full interfacing to C++

John Colvin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed May 13 08:54:46 PDT 2015


On Tuesday, 12 May 2015 at 21:44:04 UTC, Kelly wrote:
> Well the first fully working example of a large library is 
> finally working with Calypso. Elie has managed to get a Qt5 
> demo program to compile and run!!
>
> The demo is a D version of the Qt5 Widgets demo. This is a 
> simple window with a pseudo address book app. The demo uses a D 
> class inheriting from QWidget, calls 'super(parent)' from D 
> code and uses the QStrings, QLabel, QLineEdit, QLayout, 
> QGridLayout classes, among other things. You can see the code 
> here: 
> https://github.com/Syniurge/Calypso/blob/master/tests/calypso/qt5/qt5demo.d
>
> The demo is confirmed to work with Qt5.4 and Qt5.2.1.
>
> While this might not seem like a really big deal, please keep 
> in mind that while compiling this demo, Calypso effectively 
> parses and produces 692 object files, including large swathes 
> of the C++ STL and most of the Qt library!
>
> The latest push last night also cut down on compile times quite 
> a lot. Doing the initial compile of the example takes about 28 
> seconds on my mid-level Intel i5 machine, versus around 2 
> seconds for just the C++ version. After generating a cache file 
> with last nights commits you can recompile the project in just 
> 7.5 seconds...which I think is quite good for just getting 
> things up and running :)
>
> Thanks,
> Kelly

That's great! I'm looking forward to being able to easily make 
direct use of some of the great C++ code out there.

Are there are performance pitfalls to watch out for that are 
unique to the way calypso interfaces between D and C++? E.g. 
sneaky copies, implicit callbacks to keep things synced etc.


More information about the Digitalmars-d-announce mailing list