Calling / running / executing .d script from another .d script

Max Haughton maxhaton at gmail.com
Sun Jul 28 19:06:58 UTC 2019


On Sunday, 28 July 2019 at 12:56:12 UTC, BoQsc wrote:
> Right now, I'm thinking what is correct way to run another .d 
> script from a .d script. Do you have any suggestions?

You'd need to bring a compiler with you and then build it into a 
shared library (then dlopen it).

To do this you'd need a clear API defined in the file to be 
compiled, so you can call it. If you want to use druntime in said 
file you need to use loadLibrary in core instead of dlopen


More information about the Digitalmars-d-learn mailing list