Creating and loading D plugins in D app

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 2 06:22:11 PDT 2017


On Friday, 2 June 2017 at 13:05:41 UTC, aberba wrote:
> Can source of script be reloaded at runtime?

It is just an ordinary string.

> Do I have to wrap external APIs in the "global" object passed 
> as argument to "interpreter()"

Yes, anything the script calls must be exposed through that. It 
does a decent job automatically wrapping functions though, so 
just assigning them in a list might work.

> I'm trying to implement a plugin system for a vibe.d server 
> where plugins can be installed to provide additional http 
> routes: extending server functionality.

might work.


More information about the Digitalmars-d-learn mailing list