AaronRobinsonMSFT / DNNE

Prototype native exports for a .NET Assembly.
MIT License
394 stars 41 forks source link

Is this project the same as dotNet 7 Native OAT? #142

Closed ThaDaVos closed 1 year ago

ThaDaVos commented 1 year ago

I noticed it's using the same namespace for the Attribute and such - so was curious, is this implemented in dotNet 7? Or is dotNet 7's implementation based on this?

AaronRobinsonMSFT commented 1 year ago

@ThaDaVos I alluded to this in the readme.md by mentioning CoreRT. The CoreRT project is where NativeAOT came from. This project was inspired by CoreRT and decided to use the same attribute, UnmanagedCallersOnly, to express the same concept. NativeAOT is different from DNNE in that it converts the managed portion to actual native code. DNNE is similar in that it exposes a native entry point but retains the managed code as emitted by Roslyn. This has benefits and limitations. A benefit is the library isn't limited by NativeAOT constraints. The counter here is that DNNE is limited to the normal constraints of the .NET runtime, such as not supporting multiple instances of the runtime in the same process.