Repository navigation
Add user-facing docs and samples for NativeAOT - #64894
Conversation
|
Some user-facing runtime samples were moved to the common samples repo under https://github.com/dotnet/samples/tree/main/core (for easy discoverability). |
Didn't know about that - thanks! That sounds good to me. @jkotas? |
|
Sounds good to me as well. |
kant2002
left a comment
There was a problem hiding this comment.
A lot of small pedantic remarks
|
|
||
| The native AOT compiler will export methods annotated with `UnmanagedCallersOnlyAttribute` and explicitly specified name as | ||
| public C entrypoints. It makes it possible to either dynamically or statically link the AOT compiled modules into external | ||
| programs. More details are in [NativeLibrary Sample](../../samples/NativeLibrary). |
There was a problem hiding this comment.
If samples would be in separate repo, I think link should point to new location
|
|
||
| * `<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>`: this disables generation of stack trace metadata that provides textual names in stack traces. This is for example the text string one gets by calling `Exception.ToString()` on a caught exception. With this option disabled, stack traces will still be generated, but will be based on reflection metadata alone (they might be less complete). | ||
| * `<IlcTrimMetadata>true</IlcTrimMetadata>`: allows the compiler to remove reflection metadata from things that were not visible targets of reflection. By default, the compiler keeps metadata for everything that was compiled. With this option turned on, reflection metadata (and therefore reflection) will only be available for visible targets of reflection. Visible targets of reflection are things like assemblies rooted from the project file, RD.XML, ILLinkTrim descriptors, DynamicallyAccessedMembers annotations or DynamicDependency annotations. | ||
| * `<IlcDisableReflection>true</IlcDisableReflection>`: this completely disables the reflection metadata generation. Very basic reflection will still work (you can still use `typeof`, call `Object.GetType()`, compare the results, and query for basic properties such as `Type.IsValueType` or `Type.BaseType`), but most of the reflection stack will no longer work (no way to query/access methods and fields on types, or get names of types). This mode is experimental - more details in the [Reflection free mode](reflection-free-mode.md) document. |
There was a problem hiding this comment.
Here reflection-free is experimental. I was scolded about my burning passion to that mode couple times. Should “experimental” be changed to something more neutral?
There was a problem hiding this comment.
What wording are you looking for? The mode as it is very unlikely to be ever supported. It's provided as-is, with no servicing guarantees.
| @@ -0,0 +1,9 @@ | |||
| # Troubleshooting CoreRT compiler | |||
|
|
|||
| Sometimes you want to have more information how CoreRT work. ILC Compiler provide couple switches for that: | |||
There was a problem hiding this comment.
| Sometimes you want to have more information how CoreRT work. ILC Compiler provide couple switches for that: | |
| Sometimes you want to have more information how NativeAOT work. ILC Compiler provide couple switches for that: |
Co-authored-by: Andrii Kurdiumov <[email protected]>
No description provided.