interop with other environments

Max Samukha samukha at voliacable.com
Thu Apr 26 03:06:03 PDT 2007


On Thu, 26 Apr 2007 09:56:54 +0200, Alexander Panek
<alexander.panek at brainsware.org> wrote:

>On Thu, 26 Apr 2007 02:49:34 -0400
>mike <mike at nospam.com> wrote:
>
>> Hello,
>> 
>> I really like D syntax and would like to create one library in D
>> language. Now, is it possible to use this library in .NET, Python,
>> Ruby or PHP? How it could be done? You don't have to explain all,
>> just point me please in the right direction. I was trying to find
>> some more information but the fact that the language is called "D",
>> it's pretty hard to google these things.
>
>As long as there is a C bridge possible, you can use almost any library
>you wish. I don't know whether that's possible with .NET, but the other
>ones shouldn't be a problem.
>
>You might be interested in PyD[1], and bcd.gen[2].
>
>Kind regards,
>Alex
>
>[1] http://dsource.org/projects/pyd
>[2] http://dsource.org/projects/bcd

Using what they call P/Invoke, you should be able to access from a
.NET assembly any C functions exported by a dll compiled from D
source. If you are adventurous enough you could even try to create a
COM wrapper around a .NET assembly and use it from D.



More information about the Digitalmars-d mailing list