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

Use ash' built-in "linked" feature for static linking #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarijnS95
Copy link
Contributor

All the code here to define an extern "system" symbol for vkGetInstanceProcAddr and use it inside Entry (via StaticFn) was included in Ash release 0.35 (the minimum compatbile with ash-molten already) to make it much more trivial to static-link on various platforms, including against MoltenVK here.

This change makes the lib.rs portion of MoltenVK pretty much useless as it's only forwarding the call (and load() should perhaps be renamed?), should we rethink the structure of the crate a bit.

All the code here to define an `extern "system"` symbol for
`vkGetInstanceProcAddr` and use it inside `Entry` (via `StaticFn`) was
included in Ash release `0.35` (the minimum compatbile with `ash-molten`
already) to make it much more trivial to static-link on various
platforms, including against `MoltenVK` here.

This change makes the `lib.rs` portion of `MoltenVK` pretty much
useless as it's only forwarding the call (and `load()` should perhaps
be renamed?), should we rethink the structure of the crate a bit.
@MarijnS95 MarijnS95 requested a review from VZout as a code owner April 3, 2024 11:59
@MarijnS95
Copy link
Contributor Author

  = note: ld: library not found for -lvulkan
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Oh, err, I forgot that this implies a forced link against libvulkan.so in ash. Maybe we should tune that?

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