Doesn't DMD as a library already exist without an external dub project?

Andrew Edwards at
Sun Sep 6 13:47:40 UTC 2020

On Sunday, 6 September 2020 at 13:15:10 UTC, Jacob Carlborg wrote:
> On 2020-09-06 13:55, Andrew Edwards wrote:
>> My naïveté often gets the best of me, so if I seem to be 
>> jumping off the deep end, please pull me back before I hurt 
>> myself.
>> I've been wondering why so much effort is necessary to make 
>> DMD available as a library. Isn't DMD already a library? If 
>> you remove the module containing main(), all you've got left 
>> are library files. So why not merely expose them to the masses 
>> and call it a day?
> That's correct. And it's already available to the masses 
> through Dub [1][2]. Or is your goal to avoiding using Dub?

That is indeed the goal. I just want to install the compiler and 
automatically have this capability. I shouldn't need to use dub 
for this because the source code included with every compiler 

> If you're referring to the conversations you can see here from 
> time to time about DMD as a library, it's usually about make it 
> easier and more usable as a library. There are a lot of things 
> in DMD that makes it difficult to use as a library.

Yes. Those are the conversations I am referring to. Ok got you, 
thanks for the explanation. I always thought it was simply that 
the user was not able to access the compiler for use in their 
code. Is there a list somewhere capturing the improvements 
desired or problems encountered in the as-a-library experience?

More information about the Digitalmars-d mailing list