Searching hasn't turned up an answer for me, although this may well have appeared in ziglings and slipped my memory.
I'm bringing in Vulkan as a system library using translate_c on Zig 0.17.0. The resulting declaration looks like this:
pub extern fn vkEnumeratePhysicalDevices(instance: VkInstance, pPhysicalDeviceCount: [*c]u32, pPhysicalDevices: [*c]VkPhysicalDevice) VkResult;
What puzzles me is the meaning of [*c]. Does it merely say this should point at an array's initial element?
The following finally compiled for me, although I suspect there's a more conventional way to write it.
var adapters = try allocator.alloc(vulkan.VkPhysicalDevice, adapter_count);
_ = vulkan.vkEnumeratePhysicalDevices(instance, &adapter_count,
@ptrCast(&adapters[0]));
Thanks beforehand for any pointers!