virtualx-engine/modules/mono
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
..
build_scripts C#: Upgrade to .NET 6 (5.0 -> 6.0) 2022-08-22 03:36:51 +02:00
doc_classes C#: Begin move to .NET Core 2022-08-22 03:35:59 +02:00
editor C#: Initial NativeAOT support 2022-08-22 03:36:51 +02:00
glue C#: Initial NativeAOT support 2022-08-22 03:36:51 +02:00
icons
mono_gd C#: Initial NativeAOT support 2022-08-22 03:36:51 +02:00
utils C#/netcore: Add base desktop game export implementation 2022-08-22 03:36:51 +02:00
.editorconfig C#: Code cleanup and greatly reduce use of C# pointers 2022-08-22 03:36:51 +02:00
.gitignore C#: Code cleanup and greatly reduce use of C# pointers 2022-08-22 03:36:51 +02:00
__init__.py
class_db_api_json.cpp Make enum/constant binds 64-bit. 2022-06-17 16:36:26 +03:00
class_db_api_json.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
config.py C#: Begin move to .NET Core 2022-08-22 03:35:59 +02:00
csharp_script.cpp C#: Initial NativeAOT support 2022-08-22 03:36:51 +02:00
csharp_script.h C#: Re-introduce exception logging and error stack traces in editor 2022-08-22 03:36:51 +02:00
Directory.Build.props
godotsharp_defs.h C#: Ensure native handles are freed after switch to .NET Core 2022-08-22 03:36:51 +02:00
godotsharp_dirs.cpp C#/netcore: Add base desktop game export implementation 2022-08-22 03:36:51 +02:00
godotsharp_dirs.h C#: Restructure code prior move to .NET Core 2022-08-22 03:35:59 +02:00
interop_types.h C#: Move marshaling logic and generated glue to C# 2022-08-22 03:35:59 +02:00
managed_callable.cpp C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
managed_callable.h C#: Begin move to .NET Core 2022-08-22 03:35:59 +02:00
mono_gc_handle.cpp C#: Begin move to .NET Core 2022-08-22 03:35:59 +02:00
mono_gc_handle.h C#: Add source generator for properties and exports default values 2022-08-22 03:36:51 +02:00
register_types.cpp Refactor module initialization 2022-05-04 17:34:51 +02:00
register_types.h Refactor module initialization 2022-05-04 17:34:51 +02:00
SCsub C#/netcore: Add base desktop game export implementation 2022-08-22 03:36:51 +02:00
SdkPackageVersions.props C#: Static marshaling for bindings and source generators 2022-08-22 03:36:51 +02:00
signal_awaiter_utils.cpp C#: Begin move to .NET Core 2022-08-22 03:35:59 +02:00
signal_awaiter_utils.h C#: Restructure code prior move to .NET Core 2022-08-22 03:35:59 +02:00