-
Notifications
You must be signed in to change notification settings - Fork 11
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
Prepare code to run in NativeAOT #7
base: main
Are you sure you want to change the base?
Conversation
@@ -306,5 +307,6 @@ | |||
<PackageReference Include="Silk.NET.Windowing" Version="2.15.0" /> | |||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" /> | |||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="6.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be not needed once dotnet/Silk.NET#959 lands in Silk.Net and they release new version.
@@ -191,6 +191,8 @@ let main _ = | |||
let mutable options = WindowOptions.Default | |||
options.Size <- Vector2D<int>(screenWidth * zoom,screenHeight * zoom) | |||
options.Title <- "F# Wolfenstein" | |||
Silk.NET.Input.Sdl.SdlInput.RegisterPlatform() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's manual registration of platforms. By default Silk.Net uses dynamic platform registration, and this is not working well with NativeAOT, so registering platforms manually.
In order to publish using NativeAOT last change required is to target net7.0 CUrrently executable have size 99MB so I would not force that direction
In order to publish using NativeAOT last change required is to target net7.0
CUrrently executable have size 14MB so I would not force that direction