-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
generalize system SDK inclusion #39
Comments
Since i am already using the GLFW bindings this would probably be useful for zig_vulkan as well. While we are on the topic, I would also vote to move the GLFW bindings out of the mach repo into its own so it's more apparent for other projects that it's an option to use if you need a window library in zig 👍 Currently zig vulkan cross compile between windows and linux, sadly the only system wide dependency is vulkan which does not support static linking |
Good point, it would be super nice to have these libraries be in separate repos. At the same time, I am a huge fan of monorepo benefits (a single issue tracker, place to view commit activity, etc.) I will start looking into |
GLFW moved into a separate repo in #42 - it's now at https://github.com/hexops/mach-glfw |
This refactors the logic for system SDK inclusion out of the GLFW-specific `build.zig`, and should make it very easy for anyone to copy this file and start getting cross-platform builds of their own OpenGL/Vulkan Zig projects. There may be some libraries we need to add for Vulkan to these SDKs, I haven't yet tested that - but the overall idea here seems sound. Fixes #39 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This refactors the logic for system SDK inclusion out of the GLFW-specific `build.zig`, and should make it very easy for anyone to copy this file and start getting cross-platform builds of their own OpenGL/Vulkan Zig projects. There may be some libraries we need to add for Vulkan to these SDKs, I haven't yet tested that - but the overall idea here seems sound. Fixes #39 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This refactors the logic for system SDK inclusion out of the GLFW-specific `build.zig`, and should make it very easy for anyone to copy this file and start getting cross-platform builds of their own OpenGL/Vulkan Zig projects. There may be some libraries we need to add for Vulkan to these SDKs, I haven't yet tested that - but the overall idea here seems sound. Fixes hexops/mach#39 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This refactors the logic for system SDK inclusion out of the GLFW-specific `build.zig`, and should make it very easy for anyone to copy this file and start getting cross-platform builds of their own OpenGL/Vulkan Zig projects. There may be some libraries we need to add for Vulkan to these SDKs, I haven't yet tested that - but the overall idea here seems sound. Fixes hexops/mach#39 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Today, we have special build logic in https://github.com/hexops/mach/blob/main/glfw/build.zig which:
git clone
s the relevant system SDK repos https://github.com/hexops/sdk-macos-11.3 and https://github.com/hexops/sdk-linux-x86_64 needed to cross-compile GLFWThis logic is useful outside of just our GLFW bindings, though. For example, it is useful to use this for cross-compiling Google's Dawn WebGPU implementation.
It would also be useful to be able to use this logic outside of Mach entirely, for example to cross compile SDL applications @MasterQ32 ikskuh/SDL.zig#8 - or maybe for @Avokadoen to cross-compile https://github.com/Avokadoen/zig_vulkan perhaps
Idea: Move this logic into a new
system_sdk
library, so that one can easily import / benefit from this logic.Challenge: I don't think these SDKs will always include all system libraries, for example the Linux one picks a very specific set of packages - just those required to build Mach. And it would be nice to slim down the MacOS one even further (currently ~164M). Additionally, it's possible that the versions Mach uses are not what others want, or may change over time. So one important thing here will be making it so that people can very easily fork the SDK repos to modify which system libraries are included, and use their fork if preferred - although probably it'll just work fine in most cases.
Question: Does anyone actually want this? Does this sound useful?
The text was updated successfully, but these errors were encountered: