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

Add Fuchsia support #626

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Add Fuchsia support #626

merged 2 commits into from
Apr 1, 2024

Conversation

abarth
Copy link
Contributor

@abarth abarth commented May 26, 2022

Use the proper name for libvulkan.so on Fuchsia.

Use the proper name for `libvulkan.so` on Fuchsia.
ash/src/entry.rs Outdated Show resolved Hide resolved
@MarijnS95
Copy link
Collaborator

MarijnS95 commented May 26, 2022

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.

Co-authored-by: Marijn Suijten <marijns95@gmail.com>
@abarth
Copy link
Contributor Author

abarth commented May 27, 2022

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.

@abarth abarth requested a review from MarijnS95 May 27, 2022 00:06
Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fuchsia doesn't do the unixy .so.$MAJOR thing? Interesting; is this documented anywhere? Any way we can sensibly cover this in CI?

@Ralith
Copy link
Collaborator

Ralith commented May 27, 2022

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.

@abarth
Copy link
Contributor Author

abarth commented May 27, 2022

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.

@Ralith
Copy link
Collaborator

Ralith commented May 27, 2022

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.

@MarijnS95
Copy link
Collaborator

@abarth any update on not using/having a .MAJOR suffix on Fuchsia?

@MarijnS95
Copy link
Collaborator

Looking at the linked Fuchsia docs it's still libvulkan.so without .MAJOR suffix; I'll merge this in for the 0.38 release.

@MarijnS95 MarijnS95 merged commit 24c3287 into ash-rs:master Apr 1, 2024
@MarijnS95
Copy link
Collaborator

For cargo:rustc-link-lib=vulkan under the linked feature, this should keep working OOTB :)

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.

3 participants