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

NativeAOT support? #2152

Open
emrys90 opened this issue Oct 23, 2023 · 3 comments
Open

NativeAOT support? #2152

emrys90 opened this issue Oct 23, 2023 · 3 comments

Comments

@emrys90
Copy link

emrys90 commented Oct 23, 2023

It would be nice to have full NativeAOT support for RestSharp. It currently logs trimming warnings.

/root/.nuget/packages/restsharp/110.2.0/lib/net7.0/RestSharp.dll : warning IL3053: Assembly 'RestSharp' produced AOT analysis warnings.
@alexeyzimarev
Copy link
Member

The AOT support is blocked by reflections code in AddObject and AddObjectStatic. If you don't use those, it might be already working.

@emrys90
Copy link
Author

emrys90 commented Apr 3, 2024

The AOT support is blocked by reflections code in AddObject and AddObjectStatic. If you don't use those, it might be already working.

Adding attributes to those methods can fix those warnings, and should be able to do so without changing any functionality. Here's a link to an article that explains how to support NativeAOT.
https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/

@vedantmgoyal9
Copy link

If you don't use those, it might be already working.

It still produces warnings. Is there any way we can make it AOT-compatible using the guide suggested by @emrys90?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants