Re: Calling D from C, C++, Python…

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 12 02:47:54 PDT 2015


On 2015-09-12 10:56, Russel Winder via Digitalmars-d-learn wrote:

> I have a small D function (C linkage) compiled to a shared object that
> I am calling from Python via CFFI that works fine with no D runtime
> initialization. Thus I have experimental evidence "always" is not
> entirely the case! I really need to explore the boundaries of what
> point you have to actually initialize the D runtime…

Well, if your D function doesn't use anything of the runtime I guess 
it's not necessary. Example:

void foo ()
{
     printf("foo\n");
}

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list