Restructure sys crate: split bindings per platform/backend, drop Vulkan SDK requirement#23
Merged
Merged
Conversation
…s with raw pointers for compatibility.
…ulkan SDK version in README.md
Generate plugin_api_{core,windows,apple,vulkan}.rs separately so
that:
- Vulkan SDK is only needed when regenerating Vulkan bindings
- Apple build no longer depends on the unmaintained `objc` crate
- D3D / Metal / Vulkan are independently togglable
Adds `vulkan` feature to the sys crate, forwarded from unity-native-plugin. Gates D3D11 / D3D12 modules on `windows`.
Replaces bindgen.sh / bindgen_metal.sh with bindgen_<target>.sh under a new wrappers/ layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugin_api.rs(~86k lines) into per-platform/backend files (plugin_api_core.rs,plugin_api_apple.rs,plugin_api_vulkan.rs,plugin_api_windows.rs) and replacebindgen.sh/bindgen_metal.shwith separatebindgen_<target>.shscripts under a newwrappers/layout.wrappers/vulkan_stubs.h) so building the crate no longer requires the Vulkan SDK; the SDK is only needed when regenerating Vulkan bindings. Bundle the Vulkan headers license accordingly.vulkanfeature fromunity-native-plugintounity-native-plugin-sys, gate D3D11/D3D12 onwindows, and drop the unmaintainedobjcdependency on Apple by regenerating Metal bindings as raw pointers.Test plan
cargo buildon macOS with--features metaland with--features vulkancargo buildon Windows with--features d3d11,d3d12and with--features vulkancargo buildon a machine without the Vulkan SDK installed (withvulkanfeature) succeedsbindgen_<target>.shproduces the correspondingplugin_api_*.rswithout diff churn