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

Epic: Trimming and Native AOT in .NET 9 #96511

Closed
2 of 4 tasks
Tracked by #53178
agocke opened this issue Jan 4, 2024 · 6 comments
Closed
2 of 4 tasks
Tracked by #53178

Epic: Trimming and Native AOT in .NET 9 #96511

agocke opened this issue Jan 4, 2024 · 6 comments
Labels
area-NativeAOT-coreclr Epic Groups multiple user stories. Can be grouped under a theme.
Milestone

Comments

@agocke
Copy link
Member

agocke commented Jan 4, 2024

This is an in-progress record of work planned for Native AOT in .NET 9. As always, nothing is promised until it's done and shipped.

@agocke agocke added Epic Groups multiple user stories. Can be grouped under a theme. area-NativeAOT-coreclr labels Jan 4, 2024
@agocke agocke added this to the 9.0.0 milestone Jan 4, 2024
@ghost
Copy link

ghost commented Jan 4, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

This is an in-progress record of work planned for Native AOT in .NET 9. As always, nothing is promised until it's done and shipped.

Author: agocke
Assignees: -
Labels:

Epic, area-NativeAOT-coreclr

Milestone: 9.0.0

@hez2010
Copy link
Contributor

hez2010 commented Jan 5, 2024

Any chance to finalize the NativeAOT-android experiment with JNI support and ship it in .NET 9?

@danmoseley danmoseley changed the title Native AOT in .NET 9 Epic: Native AOT in .NET 9 Jan 5, 2024
@agocke agocke changed the title Epic: Native AOT in .NET 9 Epic: Trimming and Native AOT in .NET 9 Jan 29, 2024
@slxdy
Copy link

slxdy commented Jul 4, 2024

This might be something for .NET 10, but any plans on optimizing the initialization process in the entry point of DLLs (the real entry point, not the managed one)?

This might be a bit specific, but for example, when I tried to manually map a simple NativeAOT DLL into memory (aka replicate the process of LoadLibrary but manually), I ran into many errors. But one error that really caught my attention was Fatal error. Invalid Program: attempted to call a UnmanagedCallersOnly method from managed code.. How and why does this error even exist in NativeAOT, and why is it being triggered when the entry point isn't called from the real LoadLibrary?
I feel like there is a lot of unnecessary stuff going on there.

@agocke
Copy link
Member Author

agocke commented Jul 6, 2024

Any chance to finalize the NativeAOT-android experiment with JNI support and ship it in .NET 9?

Sorry, didn't see this question earlier. Answer is no. Getting the JNI support requires having Java interop work with CoreCLR (not just Mono) and that's a large feature. In particular, the existing support uses direct interaction with the Mono GC (sgen), so it needs to be rewritten to either use the CoreCLR GC, or ideally rewritten to not depend on specific unmanaged GC APIs at all.

@agocke
Copy link
Member Author

agocke commented Jul 6, 2024

@slxdy

I feel like there is a lot of unnecessary stuff going on there.

There isn't/shouldn't be. If you walk through the Native AOT code in a native debugger you can see the entire chain. There's not much going on. Your case sounds more like a bug to me. I would try debugging it and figure out exactly what's going wrong. You could also file an issue if you have a minimal repro.

@agocke
Copy link
Member Author

agocke commented Jul 8, 2024

Closing out as we're still working on bugs, but it's unlikely that we're bringing in anything new and big for net9

@agocke agocke closed this as completed Jul 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr Epic Groups multiple user stories. Can be grouped under a theme.
Projects
Archived in project
Development

No branches or pull requests

3 participants