dubiousconst282 / DistIL

Post-build IL optimizer and intermediate representation for .NET programs
MIT License
117 stars 2 forks source link

References #38

Closed furesoft closed 4 hours ago

furesoft commented 6 hours ago

How can I add other assemblies as reference to a module? And how can I set the module kind?

dubiousconst282 commented 5 hours ago

You can load other assemblies through ModuleResolver.Load() or Resolve(), the assembly reference list will be automatically generated based on which members are referenced in the IR when saving the module.

Can you clarify on what you mean by module kind?

Sorry for delayed response, I missed this earlier

furesoft commented 4 hours ago

A dotnet assembly can be a dll, a windows executable or a console app.

dubiousconst282 commented 4 hours ago

I see. DistIL only supports generating .NET core modules and these are only in the form of Windows DLLs. The dotnet sdk can deploy an additional .exe for launching the runtime and DLL, which I believe is just patching a pre-built apphost.exe.

I'm not sure that is in scope for DistIL since it seems like there would be some versioning complications, but I haven't looked deep at it.