virtualx-engine/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators
Ignacio Roldán Etcheverry 4b90d16250 C#: Initial NativeAOT support
This commit adds initial support for games exported as NativeAOT shared
libraries.

At this moment, the NativeAOT runtime is experimental. Additionally,
Godot is not trim-safe as it still makes some use of reflection.
For the time being, a rd.xml file is needed to prevent code triming:

```
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
  <Application>
    <Assembly Name="GodotSharp" Dynamic="Required All" />
    <Assembly Name="GAME_ASSEMBLY" Dynamic="Required All" />
  </Application>
</Directives>
```

These are the csproj changes for publishing:

```
  <PropertyGroup>
    <NativeLib>Shared</NativeLib>
  </PropertyGroup>
  <ItemGroup>
    <RdXmlFile Include="rd.xml" />
    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
  </ItemGroup>
```

More info:
- https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/compiling.md
- https://github.com/dotnet/runtimelab/tree/feature/NativeAOT/samples/NativeLibrary
- https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/rd-xml-format.md
2022-08-22 03:36:51 +02:00
..
Common.cs C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
ExtensionMethods.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
Godot.SourceGenerators.csproj C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
Godot.SourceGenerators.props C#/netcore: Add base desktop game export implementation 2022-08-22 03:36:51 +02:00
GodotClasses.cs C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
GodotEnums.cs C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
GodotMemberData.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
GodotPluginsInitializerGenerator.cs C#: Initial NativeAOT support 2022-08-22 03:36:51 +02:00
MarshalType.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
MarshalUtils.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
ScriptMemberInvokerGenerator.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
ScriptPathAttributeGenerator.cs C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
ScriptPropertiesGenerator.cs C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
ScriptPropertyDefValGenerator.cs C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
ScriptRegistrarGenerator.cs C#: Add initial implementation of source generator for script members 2022-08-22 03:36:51 +02:00