4b90d16250
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 |
||
---|---|---|
.. | ||
build_scripts | ||
doc_classes | ||
editor | ||
glue | ||
icons | ||
mono_gd | ||
utils | ||
.editorconfig | ||
.gitignore | ||
__init__.py | ||
class_db_api_json.cpp | ||
class_db_api_json.h | ||
config.py | ||
csharp_script.cpp | ||
csharp_script.h | ||
Directory.Build.props | ||
godotsharp_defs.h | ||
godotsharp_dirs.cpp | ||
godotsharp_dirs.h | ||
interop_types.h | ||
managed_callable.cpp | ||
managed_callable.h | ||
mono_gc_handle.cpp | ||
mono_gc_handle.h | ||
register_types.cpp | ||
register_types.h | ||
SCsub | ||
SdkPackageVersions.props | ||
signal_awaiter_utils.cpp | ||
signal_awaiter_utils.h |