Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kant2002
Copy link
Contributor

@kant2002 kant2002 commented Jun 18, 2022

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

@@ -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" />
Copy link
Contributor Author

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()
Copy link
Contributor Author

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant