Skip to content

Native AOT + unmanaged static lib interop: DLL required while development phase? #113291

Answered by AustinWise
thewavelength asked this question in Q&A
Discussion options

You must be logged in to vote
  1. Yes, I think it makes sense to use CoreCLR dynamically linking against your library during development. The compile times are much faster than doing native AOT. Beyond that, you can use features like hot reload to further speed up the development inner loop. ilc.exe itself (the NativeAOT compiler) is developed this way in this repo.
  2. Yes, this means you will need dynamically libraries when running on CoreCLR and need static libraries when publishing for NativeAOT.
  3. I have some thoughts on the C# side that makes it relatively painless, but you still to compile your native libraries twice. I'm not aware of a way to make the fundamental difference between static and dynamic linking easier.

I…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by thewavelength
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants