On Sat, Feb 01, 2020 at 08:01:34PM +0000, Andre Pany via Digitalmars-d-learn 
wrote:
[...]
> Another approach:
> - include the dmd compiler package with your application
> - within your app call the compiler executable and compile the source
> code to a dll / so
> - call the dll / so function
[...]

I've actually done this before in an equation grapher program: the user
inputs an equation, the program generates D code to compute the
equation, then runs dmd to compile it into a shared library, and opens
the shared library and looks up the symbol to execute the compiled code.
Dmd is fast enough that this actually works fairly well. When the input
to dmd is small, it's so fast you don't even notice it.


T

-- 
An imaginary friend squared is a real enemy.

Reply via email to