ash
ash copied to clipboard
Add Fuchsia support
Use the proper name for libvulkan.so on Fuchsia.
https://doc.rust-lang.org/reference/conditional-compilation.html#target_os I'm surprised the official docs don't mention the existence of fuchsia :/. It's "only an example", but still.
Fuchsia is a Tier 2 supported OS for Rust:
https://doc.rust-lang.org/rustc/platform-support.html#tier-2
For context, I'm a Fuchsia OS developer. We'd like to switch over from vk_sys to ash in our Vulkan stack for Rust, but we ran into this minor issue.
Note that if you build ash with features = ["linked"], default-features = false, existing versions of ash should Just Work, and be less fragile at runtime besides.
Fuchsia doesn't do the unixy .so.$MAJOR thing?
Yes, we do that for most shared libraries. I'm not sure why libvulkan.so doesn't have a .$MAJOR suffix.
Interesting; is this documented anywhere?
https://fuchsia.dev/fuchsia-src/development/graphics/magma/concepts/vulkan?hl=en#buildtime_dependencies
Any way we can sensibly cover this in CI?
Not yet. We're working on that as part of our quest for Tier 1 support in Rust.
Note that if you build ash with features = ["linked"], default-features = false, existing versions of ash should Just Work, and be less fragile at runtime besides.
Ok, I'll give that a try.
Yes, we do that for most shared libraries. I'm not sure why libvulkan.so doesn't have a .$MAJOR suffix.
Hmm, are you using the standard Khronos Vulkan loader? This may be a bug in the upstream build system, if so. I'm not entirely clear on the significance of respecting that pattern vs. not, but I figure it's probably worth being consistent with the system at large.
@abarth any update on not using/having a .MAJOR suffix on Fuchsia?
Looking at the linked Fuchsia docs it's still libvulkan.so without .MAJOR suffix; I'll merge this in for the 0.38 release.
For cargo:rustc-link-lib=vulkan under the linked feature, this should keep working OOTB :)