SuaveIO / suave

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
https://suave.io
Other
1.32k stars 198 forks source link

Support Xamarin.Mac "Modern" framework #752

Closed jwosty closed 1 year ago

jwosty commented 3 years ago

Suave should support the Xamarin.Mac "Modern" framework. I have a Xamarin.Mac app which uses Suave internally and would greatly benefit from being able to target Xamarin.Mac modern rather than the less-recommended "full framework." Modern framework allows better linking and eliding of dead code, and is often used in conjunction with AOT. Relevant information: https://docs.microsoft.com/en-us/xamarin/mac/deploy-test/performance#prefer-modern-target-framework

Given Suave's nonexistent dependencies, (other than F#), there's a very good chance the codebase itself is compatible already. It should just be a matter of adding a target framework moniker of "xammac2.0" to <TargetFrameworks> with the help of Microsoft.Sdk.Extras.

Here's an fsproj that does this: https://github.com/fsprojects/Interstellar/blob/master/src/Interstellar.MacOS.WebKit/Interstellar.MacOS.WebKit.fsproj#L4

And the corresponding NuGet package: https://www.nuget.org/packages/Interstellar.macOS.WebKit/