> I'm not sure it's good practice to make instance from library handle. It can be invalid handle accidentally passed by user or handle obtained from dlopen or LoadLibrary that is wrong for libraries with D runtime because they should be loaded with rt_loadLibrary as I understand.

I don't want to be overly restrictive here because people might want to use handles from C code in D.
But we can scratch this for now if you think it's better.

> Another thing I want to mention is loading mode. dlopen on Linux and LibraryLoadEx on Windows provide some specific flags that can be used here too.

I don't see a good use-case for flags and we'd have to implement them in a portable way.

> It also useful to add D-specific flags like NotLoadClassInfos to reject automatic ClassInfo loading for all classes in shared library if it's not needed (I'm sure it's some expensive operation).

Not sure what you're referring here to. ClassInfos are normal symbols with the library. The loaded ModuleInfos contain a list of local classes that can be used for reflection.