Is it possible to use DMD as a library to compile strings at runtime?
    Saurabh Das 
    saurabh.das at gmail.com
       
    Mon Feb  3 11:42:22 UTC 2020
    
    
  
On Sunday, 2 February 2020 at 06:03:01 UTC, H. S. Teoh wrote:
> On Sun, Feb 02, 2020 at 03:16:46AM +0000, Saurabh Das via 
> Digitalmars-d-learn wrote:
>> [...]
> [...]
>> > [...]
> [...]
>> [...]
> [...]
>
> It's very simple. Let's say you have your code in some string 
> called 'code'. Since dmd nowadays can take stdin as input 
> (specify "-" as input filename), all you have to do is to 
> assemble your dmd command and use std.process's awesome API to 
> run it:
>
> [...]
Thanks. Will try this out.
Saurabh
    
    
More information about the Digitalmars-d-learn
mailing list