www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Interface D with other languages

reply "Andrea Fontana" <nospam example.com> writes:
I know there are several tools around to import libraries from 
other languages. For example dstep or swig.

Is there any tool that we can use to export D to other language? 
Something like SWIG but d-based rather than c/c++ based. Anyone?

It would be great (for example) to  annotate 
classes/struct/method/function to export and have a 
php/python/.net library (or anything else) to use.

I guess a double step is needed: D -> C interface -> XXX classes.
Mar 26 2014
next sibling parent reply "Andrea Fontana" <nospam example.com> writes:
On Wednesday, 26 March 2014 at 14:45:57 UTC, Andrea Fontana wrote:
 I know there are several tools around to import libraries from 
 other languages. For example dstep or swig.

 Is there any tool that we can use to export D to other 
 language? Something like SWIG but d-based rather than c/c++ 
 based. Anyone?

 It would be great (for example) to  annotate 
 classes/struct/method/function to export and have a 
 php/python/.net library (or anything else) to use.

 I guess a double step is needed: D -> C interface -> XXX 
 classes.
This seems to be a D -> python ! https://bitbucket.org/ariovistus/pyd
Mar 26 2014
parent "Ellery Newcomer" <ellery-newcomer utulsa.edu> writes:
On Wednesday, 26 March 2014 at 14:52:56 UTC, Andrea Fontana wrote:
 This seems to be a D -> python !
 https://bitbucket.org/ariovistus/pyd
a D <-> python even! annotations would be a nifty enhancement, something like python_expose class Foo { python_expose public void bar() { } // no expose public Fizz baz() { } } maybe?
Mar 29 2014
prev sibling parent "JN" <666total wp.pl> writes:
On Wednesday, 26 March 2014 at 14:45:57 UTC, Andrea Fontana wrote:
 I know there are several tools around to import libraries from 
 other languages. For example dstep or swig.

 Is there any tool that we can use to export D to other 
 language? Something like SWIG but d-based rather than c/c++ 
 based. Anyone?

 It would be great (for example) to  annotate 
 classes/struct/method/function to export and have a 
 php/python/.net library (or anything else) to use.

 I guess a double step is needed: D -> C interface -> XXX 
 classes.
http://forum.dlang.org/thread/lgspgg$2i8l$1 digitalmars.com
Mar 26 2014