Creating and loading D plugins in D app

aberba via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 2 04:09:05 PDT 2017


On Friday, 2 June 2017 at 02:05:23 UTC, Stefan Koch wrote:
> On Thursday, 1 June 2017 at 23:24:13 UTC, aberba wrote:
>> Want to create and load plugins written in D into a D app at 
>> run-time, the kind that can make api calls or extended main 
>> app with other functionality.
>>
>> I'm currently interested in it for a vibe.d app. How does 
>> these stuff work?
>
> It works using shared libraries.

I just read it on Wikipedia. An alternative is to use a 
scripting/interpreted language. Working with such approach feels 
unnatural in D (considering pyd, lua-d).


A more sustanable approach would be:

1. Get shared libs to work in D (the best approach for all D code)

1. some kind of embeddable interpreter for a scripting language 
like (a mini js engine) which exposes callable native D APIs at 
runtime

None of which is within my current ability.


More information about the Digitalmars-d-learn mailing list