C++ Binding Generator
Moritz Maxeiner
moritz at ucworks.org
Tue Feb 18 03:05:19 PST 2014
On Sunday, 16 February 2014 at 14:10:02 UTC, Abdulhaq wrote:
>
>> yes github please.. i'd like to check this out.
>
> OK I'm in the process of migrating the code to github. I was in
> such a hurry yesterday evening I didn't list the features
> properly:
>
> FEATURES
> ========
>
> * All D
> * Understandable, maintainable code
> * Wraps protected and virtual methods, allows virtual methods
> to be overridden in D
> * Mixin classes in target C++ library supported
> * Allows custom type conversions between C++ and D types
> * C++ enums mapped to D enums and are type checked in D
> * Wraps nested C++ classes
> * Tested
> * Based on the sip format. This is well proven and allows
> simplified maintenance of wrappers for multiple versions of the
> target library. (All larger target libraries will need some
> ongoing maintenance of the wrapper regardless of the wrapping
> technology).
>
> Once all the code is in github I'll just check that a totally
> clean build is working, and then give you a heads up. FYI the
> repository is at
>
> https://github.com/alynch4047/smidgen/tree/master/morsel
This looks very nice!
Two questions, though:
1) Is it possible to use an already existing C API with morsel?
The reason I'm asking is, because LLVM classes contain many
methods where an automatic conversion is likely to cause memory
leaks to appear. This is the main reason why I decided to use the
C-API for my llvm-d project, instead of attempting to use
automatic tools like SWIG (that and the fact that LLVM did not
export C++ symbols properly for a Windows DLL, so you needed to
use the C API anyway).
2) What is the main difference between using morsel and SWIG,
other than the language used to specify the interface?
More information about the Digitalmars-d
mailing list