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

Paul O'Neil via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Sep 20 21:22:31 PDT 2015


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.

-- 
Paul O'Neil
Github / IRC: todayman


More information about the Digitalmars-d-announce mailing list