-
Notifications
You must be signed in to change notification settings - Fork 25
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
Static linking support? #214
Comments
Hi! Yes, we have 2 FFI-compatible compilation targets:
Both use Things to keep in mind when considering gfx-portability:
|
Ah cool, then it sounds like it should be possible to connect the Vulkan functions directly to the functions pointers the Right now our needs are pretty basic (and no tessellation) so likely will work well out of the box, but if/when we do try it out we'll make sure to report any issues. Glad to hear about your "performance guarantee" :) Compiling MoltenVK on my 6 core MBP15 took over 10 min from scratch, while building Btw another question, what do you use for SPIRV -> MetalSL? |
Yes, it should be possible.
That sounds quite fast indeed. I'm slightly confused as to why MVK would be building that much longer. I mean, Rust is known for its build times, and we have at least one extra logical layer of going through the gfx-rs traits (staticly dispatched, no perf concerns) between the Vulkan API and gfx-backend-metal. Oh, did you enable the "metal" feature when building? That would explain the difference :)
We've been using SPIRV-Cross, relying on the work by MVK author and ARM so far. |
@kvark Thanks for the reply. IIRC the last time I had a look at the portability lib I wanted to use https://github.com/gfx-rs/portability/blob/master/libportability-gfx/src/impls.rs#L59 I think the problem last time was that protability-gfx was using gfx-hal straight from master and I was running into build issues. https://github.com/gfx-rs/portability/blob/master/libportability-gfx/Cargo.toml#L36 Felt a bit wrong to go through the c barrier when I am already in Rust. Also I think I'd actually need to modify the cargo.toml to give me a static lib right? Any plans of using gfx-hal from crates.io instead of git for |
@MaikKlein hi!
Not sure what build issues you are referring to: we have extensive CI coverage both here and on gfx-rs, all
You mean
We haven't yet considered that. I suppose we'll have to do this in order for you to be able to publish anything like In some projects, we keep the I think the same scheme would make sense here. If you need to publish soon-ish, we can make a release of libportability-gfx that depends on gfx-hal-0.5. If not, we can start doing the releases once gfx-hal-0.6 is out. |
Because in the repo you have a
Oh nice, I didn't even know you could do that.
It is not something super urgent. Worst case scenario with #215 I can just treat this lib like moltenvk and compile/link it manually in a But it would be nice to have a proper crates.io release. It would be nice to leave moltenvk behind :). |
Does gfx-portability support full static linking into an executable? I.e. not build and separately distribute it as a vulkan dll?
We (Embark) are quite interested of replacing the big MoltenVK C++ library (that we use through our ash-molten crate) with gfx-portability but we do need to be able to continue statically link in everything to a single executable
The text was updated successfully, but these errors were encountered: