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 #180

Open
kjhickman opened this issue Oct 7, 2024 · 3 comments
Open

NativeAOT support #180

kjhickman opened this issue Oct 7, 2024 · 3 comments

Comments

@kjhickman
Copy link

I was curious if NativeAOT-support is something being considering for a future release.

In my own testing with this package I found just two places I believe to the the problem for AOT. JsonSerializer.Deserialize<JsonElement>(body) is called without passing in a JsonTypeInfo<T> inside QueryResponse.GetFromResponseBody<T>() and Event<T>.From(). For now even without resolving this, these methods could be decorated with [RequiresUnreferencedCode("some message")] to signal that they won't work with AOT.

If not, I'd be interested in possibly taking a stab at adding support for NativeAOT myself. Could you provide guidance on whether this would be a welcomed contribution, or if there are any specific challenges or considerations that should be kept in mind?

@cynicaljoy
Copy link
Contributor

We currently do not have Native AOT support on our roadmap. We welcome contributions, but we would like to better understand what goals/expectations you have from Native AOT support. What benefits/features are you expecting to be unlocked with Native AOT support? Does the lack of Native AOT support currently prevent you from using the driver?

@kjhickman
Copy link
Author

Since Native AOT-published apps can startup so much faster with a smaller memory footprint, they're great for serverless apps. With Fauna being a serverless database, it does lend itself to being used in a serverless context as well, but currently it's not usable at all for Native AOT.

In my case, a serverless function cold-start duration can be drastically reduced with AOT. I have a strict time constraint for quickly the function must run, so Native AOT is basically a requirement.

@cynicaljoy
Copy link
Contributor

sorry for delayed response @kjhickman. It'd be awesome if you can cut a PR. Can you also let us know which platform(s) you are targeting? This will help us better understand the context and provide better guidance.

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

No branches or pull requests

2 participants