Thoughts about my crate and advice for future decisions


I'm working on a safe wrapper around Vulkan API. I know there are available crates for it but I wanted to make one myself. Though it is in very early stage, I want some advice about my code and future decisions. Here is my repository.

Looks good.

I did notice one thing in the example though that could make the code easier to read. You have:

let instance = vk::Instance::new(Some(&app_info), None, Some(extensions)).unwrap();

Convert the constructor to return an InstanceBuilder with None defaults, then, make a build function that returns an Instance once the programmer sets the values needed via with_varname. This is cleaner than having mixes between Some and None in a singular constructor. (long story short: use builder pattern)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.