Skip to content

Draft: Add builder methods#4

Draft
BitSyndicate1 wants to merge 7 commits into
Friz64:rewritefrom
BitSyndicate1:rewrite-builders
Draft

Draft: Add builder methods#4
BitSyndicate1 wants to merge 7 commits into
Friz64:rewritefrom
BitSyndicate1:rewrite-builders

Conversation

@BitSyndicate1
Copy link
Copy Markdown

No description provided.

@BitSyndicate1 BitSyndicate1 marked this pull request as draft May 3, 2026 21:35
Copy link
Copy Markdown
Owner

@Friz64 Friz64 left a comment

Choose a reason for hiding this comment

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

pretty good already, nice work

Comment thread analysis/src/item/structure.rs Outdated
Comment thread generator-rewrite/src/item/structure.rs Outdated
@Friz64
Copy link
Copy Markdown
Owner

Friz64 commented May 4, 2026

oh and we also need to reexport this new trait in the vk module

vfs.write("vk.rs", quote! { pub use crate::Handle; });

@BitSyndicate1
Copy link
Copy Markdown
Author

oh and we also need to reexport this new trait in the vk module

vfs.write("vk.rs", quote! { pub use crate::Handle; });

done

@Friz64
Copy link
Copy Markdown
Owner

Friz64 commented May 4, 2026

looking good

@BitSyndicate1 BitSyndicate1 changed the title Draft: add TaggedStructure trait to rewrite Draft: Add builder methods May 4, 2026
Comment thread analysis/src/decl.rs
}

#[derive(Debug, Clone, Copy)]
pub enum RustType {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hm, this abstraction is getting pretty leaky and ugly, but I'm not sure what else to do here :/

Originally I wanted the analysis crate to theoretically be used to generate Vulkan bindings for any programming language (except for the to_rust module obv.).

@jedjoud10
Copy link
Copy Markdown

jedjoud10 commented May 24, 2026

I am currently working on trimming the p_ and pp_ prefixes from function names on structs (but keeping their internal field names the same, just like ash did prior to generator rewrite) and I came onto a problem that I am unsure on how to solve.

In opacity_micromap.rs, there are both p_usage_counts and pp_usage_counts (which is a bit odd, why would you need to pas a reference to a copy-able struct? I am unsure why the spec states it this way...)

After trimming p_ and pp_ from the names these two functions become duplicates. I am unsure on how to handle this. This isn't the only extension that has this problem as well (this is also the case for acceleration_structure.rs, displacement_micromap.rs, from my building errors atm).

Other than that this is fine. I can push if you would like me to do so as well, but the generated code does not build successfully.

Edit: Here is the erroneous file in the question in my fork

@Friz64
Copy link
Copy Markdown
Owner

Friz64 commented May 25, 2026

can we do the same thing ash does by generating a usage_counts_ptrs method for the ppUsageCounts variant?

@jedjoud10
Copy link
Copy Markdown

jedjoud10 commented May 25, 2026

can we do the same thing ash does by generating a usage_counts_ptrs method for the ppUsageCounts variant?

that works, should we also extend that to work with every pp method or just the ones in question?

unrelated but I have been trying to get loaders working. got simple code-gen going for Instance types. Let me know if I should make a new PR.

@jedjoud10
Copy link
Copy Markdown

jedjoud10 commented May 25, 2026

alright, I implemented fix for it here jedjoud10@860b607, albeit you might need to cherry pick that and this previous commit as well jedjoud10@ff183e2

I am unsure why it shows that the entirety of the to_rust.rs has been modified though.

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