-
Notifications
You must be signed in to change notification settings - Fork 187
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
Writing layers in Rust. #573
Comments
On this topic, a |
For anyone who interested in writing layers in Rust. I have created a thin layer API binding on top of ash https://github.com/EHfive/ash-layer. |
I'm against projects like ash-layer. To start with the name when you upload it to crates.io you're locking that name globally, I would be more in favor if the name was made-up. Secondly, I don't see why it is separate from ash. For such a small thing, I believe each layer can have a copy of this code until ash exposes these utility. |
I don't see problem here.
|
That is not true. We've already tackled the struct-matching problem described above in #614, and I've started playing around with API bindings for layers in https://github.com/Traverse-Research/ash/tree/layer-boilerplate but no cleanup nor PR has materialized yet. Mainly debating whether to aim for a minimal wrapper around the necessary types first, or immediately provide generated helpers to set up dispatch tables by utilizing our generator. |
For 3 it's already an issue on crates.io where abandoned names for different reasons can not be recovered for the foreseeable future. The rust bus was created to help with this, moving the problem to another node. I don't see a good way around this, that's why I think you should reconsider the name. To avoid the round trip, all the reasons you could have that this name is important are the reasons why descriptive names shouldn't be used for rust crates. |
https://github.com/Manishearth/namespacing-rfc And please focus on the topic regarding "Writing layers in Rust" instead of how a name can not be used. Further messages regarding naming of |
What a wonderful way to admit you've lost an argument without saying so... I'll try and remember that one. |
@EHfive fine by me if you wish to reduce the bus factor. I'm intending to PR a minimal set of structs in a new While the minimal "sys"-like bindings could be part of |
Great! Sent the invite.
Nice to hear that. |
@EHfive thanks, I've accepted the invite! Unfortunately haven't gotten to pushing/PR'ing anything yet, maybe over the weekend. Let's make this small and incremental :) |
There are a few new strucks not included:
https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/25d5884746a2de7b51a8ef3ec88e1cd8066460e8/include/vulkan/vk_layer.h#L112
It becomes a pattern of descending chains of pnext looking for a particular strict type.
Many tools used in implementing vulkan in rust would be handy.
I am working on an example layer, I expect it to segfault a lot. Edit: It did!
Edit add:
vk::StaticFn::load()
should takePFN_vkGetInstanceProcAddr
, one of these should be changed to match the other.Edit add: Sometimes create(I.E. create_instance) can't be passed a pointer to zeroed memory.
The text was updated successfully, but these errors were encountered: