cpp_binder, a not-yet-useful tool for generating C++ bindings

deadalnix via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Sep 20 22:30:55 PDT 2015


On Monday, 21 September 2015 at 04:22:30 UTC, Paul O'Neil wrote:
> As the title says, cpp_binder is a tool that generates C++ 
> bindings.  It reads C++ headers and produces a D file filled 
> with "extern(C++)" declarations.  It can translate a bunch of 
> cool, small examples, but is not close to being ready for 
> prime-time.  It crashes a lot, especially in the STL; since the 
> STL is pretty pervasive, I have not successfully used 
> cpp_binder on an actual C++ library.
>
> I've written more about cpp_binder and my experiences at 
> http://www.todayman.net/cpp_binder-pre-announcement-and-status.html.
>
> The code is available at https://github.com/todayman/cpp_binder 
> . cpp_binder still dumps lots of debugging info to stdout and 
> stderr, so you'll probably want to redirect those somewhere 
> beesides your console.
>
> I hope that this post will spur discussion / decisions / action 
> binding C++ libraries into D.  I think the language 
> capabilities (e.g. extern(C++, namespace)) get really far and 
> that the next big push needs to be on binding real libraries 
> and tools to help.

This strikes as a most needed project. How come it crashes a lot 
? Glancing quickly at the source, it looks like it is using clang 
as a source of C++ truth.

If you can make it work on the STL, that would be a significant 
step forward for D. I'm very serious.


More information about the Digitalmars-d-announce mailing list