praeclarum / sqlite-net

Simple, powerful, cross-platform SQLite client and ORM for .NET
MIT License
4k stars 1.42k forks source link

NativeAOT support plans #1218

Open Sergio0694 opened 5 months ago

Sergio0694 commented 5 months ago

I saw that this project (which I love and have been using in some of my apps for years!) has just started getting some updates again, and I wanted to ask about the status for NativeAOT support. Just to clarify, this is not me saying "you need to add NativeAOT", but rather just wondering whether any thought has been put into it as whether it's more in the "never going to happen and not planned" or "we want to do this eventually", mostly so that it can help people workinf on new projects makenbetter and decisions on what SQLite wrapper to use in .NET 🙂

I understand that making this fully trim-safe and AOT-safe would be a significant amount of work and adding a new multi-target for .NET 8 (also likely requiring some source generators with eg. interceptors to replace the heavy use of reflection and LINQ expressions), so I'd understand if this was just something that's not being looked into, but figured I'd ask!

Keep up the good work! 😄

Sergio0694 commented 4 months ago

Figured I'd take it upon myself to make a PR for this, since I do want to help out (especially given I've been using this library myself for years and I really like it, and I'd love to be able to give back). I've opened #1222 and added all necessary trim/AOT annotations there to make the code fully trim/AOT-safe. Surprisingly enough, it seems like virtually all code can still work with trim and AOT once all the right annotations are in place, so that is awesome 😄

@praeclarum whenever you have time, please take a look and let me know what you think!