-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Does AOT plan to support EMIT in the future #95841
Comments
Tagging subscribers to this area: @dotnet/area-system-reflection-emit Issue DetailsBackground and motivationEMIT performs very well when running create classes and code. Hope to support it in AOT API Proposal// 创建一个程序集
API Usage// Fancy the value
var c = new MyFancyCollection<int>();
c.Fancy(42);
// Getting the values out
foreach (var v in c)
Console.WriteLine(v); Alternative DesignsNo response RisksNo response
|
See the current experiment:
If you want the benefit of AOT compilation together with dynamic execution, you can use ReadyToRun. Native AOT is designed for environments that doesn't allow dynamic code at all. |
It is theoretically possible to turn dynamic IL into dynamic machine language at the time of release |
How dynamic it would be? Source generator is mainly created for generating code at build time, with the information from existing code. |
EMIT is used to create classes at runtime. For example, if a user wants to create a table, the table does not exist, so I need to create classes online |
Future low-code AI methods will have to be created automatically at runtime |
What do you expect to get out of this? The performance characteristics of a configuration like this would be very similar to CoreCLR with trimming and ReadyToRun. What prevents you from using CoreCLR with trimming and ReadyToRun? |
ReadyToRun cannot create objects after the application starts, unlike the runtime creation of EMIT |
ReadyToRun works with JIT. You can just use Emit together with ReadyToRun. |
【AOT+EMIT+ReadyToRun 】 Can you use it together? |
NativeAOT and ReadyToRun provides similar AOT compilation for different environment. NativeAOT is "full AOT" used for environment where dynamic code is disallowed. ReadyToRun is "partial AOT" and brings the benefit of AOT to environment where JIT is still allowed. Which environment are you interested in? What benefit of AOT are you caring about? |
Thank you very much. Got it |
Background and motivation
EMIT performs very well when running create classes and code.
It is also important in low code development
Hope to support it in AOT
The text was updated successfully, but these errors were encountered: