Skip to content

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

Open
MarijnS95 wants to merge 1 commit into
EmbarkStudios:mainfrom
MarijnS95:ash-linked-feature
Open

Use ash' built-in "linked" feature for static linking#84
MarijnS95 wants to merge 1 commit into
EmbarkStudios:mainfrom
MarijnS95:ash-linked-feature

Conversation

@MarijnS95

Copy link
Copy Markdown
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
Copy Markdown
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