-
Notifications
You must be signed in to change notification settings - Fork 620
Refactor native library compilation stack #4997
Copy link
Copy link
Closed
space-wizards/native-build
#8Labels
D1: HighExtensive codebase knowledge required.Extensive codebase knowledge required.Platform: LinuxThings that relate to Linux explicitly.Things that relate to Linux explicitly.Platform: MacOSThings that relate to macOS explicitly.Things that relate to macOS explicitly.Platform: WindowsThings that relate to Windows explicitly.Things that relate to Windows explicitly.Priority: 2-ImportantT: RefactorType: Code refactorType: Code refactor
Metadata
Metadata
Assignees
Labels
D1: HighExtensive codebase knowledge required.Extensive codebase knowledge required.Platform: LinuxThings that relate to Linux explicitly.Things that relate to Linux explicitly.Platform: MacOSThings that relate to macOS explicitly.Things that relate to macOS explicitly.Platform: WindowsThings that relate to Windows explicitly.Things that relate to Windows explicitly.Priority: 2-ImportantT: RefactorType: Code refactorType: Code refactor
The system we have for compiling native libraries for Robust is currently a mess. We need to clean this up so we can distribute natives to all platforms consistently (Fluidsynth/OpenAL Soft on macOS), distribute new libraries (SDL2) and be able to do updates to these more easily. This is currently blocking ARM support (#1443).
Background
Native libraries right now are shoddily cobbled together from a few sources. Some libraries we get from third-party NuGet packages1. The rest we distribute ourselves (via our own NuGet packages we publish to nuget.org), and they are put together with a combination of "compiled ourselves" and "downloaded from the project's website"2.
In the latter case, https://github.com/space-wizards/build-dependencies is responsible for both containing a record of these dlls and containing the NuGet packaging files used to produce the native libraries.
When we compile natives ourselves, the scripts for doing so are stored in https://github.com/space-wizards/native-build, but they're a complete unstandardized mess.
The problem
The native libraries we get from third-party NuGets are mostly fine (well, I haven't had any issues yet).
The native libraries we publish via NuGet are a pain in the ass. It's a ton of manual work that requires doing stuff on at least three operating systems. Bonus points we keep losing the PDB files so debugging is impossible.
I would like to see the following improvements made:
Footnotes
e.g. libsodium: https://www.nuget.org/packages/libsodium ↩
e.g. GLFW: https://github.com/space-wizards/build-dependencies/tree/343d4dee05495241c3e49bebc54ee6cc4383daf9/natives/glfw/3.3 ↩