Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Support AOT Scenarios #230

Open
smaillet opened this issue Mar 8, 2025 · 0 comments
Open

[Feature] - Support AOT Scenarios #230

smaillet opened this issue Mar 8, 2025 · 0 comments

Comments

@smaillet
Copy link
Member

smaillet commented Mar 8, 2025

Is your feature request related to a problem? Please describe.
When converting to a modern .NET runtime, this library should support AOT scenarios.

Describe the solution you'd like
Ensure all libraries for .NET support AOT scenarios. (All samples should support [And test] publish to native AOT to verify functionality)

With a STRONG emphasis on performance the new P/Invoke Source Generation support in .NET allows for a more flexible AOT compatible interop while also opening the door for more performant interop with "lazy" marshalling (especially for strings). The code does NOT need to marshal from native to managed and then back to native again if it already has the native form. Caching of the conversions is plausible and deferring the conversions to as late as possible combine to make a much more efficient system.

Additional context
It is currently unclear how AOT scenarios are testable as it appears that tests don't support that. (The test host framework isn't AOT as it needs to dynamically load and discover tests etc...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant