name: vulkan
gpid: malunal
semv: 1.0.0

options:
  level: 2

requires:
- https://git.malunal.studio/sakura/std@v1.0.0

targets:
# Vulkan, as its registry declares it: the functions of its core and of the
# extensions bound, the structs and unions they take, and the numbers they're
# asked for and give. Every file of it is written by `malunal.vulkan.bindings`.
- name: malunal.vulkan
  type: library
  root: ./vulkan

# Writes `vulkan/` from the Vulkan registry, `vk.xml`, the Vulkan SDK's unless
# another is named.
- name:  malunal.vulkan.bindings
  type:  program
  level: ${level}
  deps:
  - std.args
  - std.containers
  - std.io
  - std.process
  - std.xml
  srcs:
  - tools/bindings.sakura
  - tools/registry.sakura
  - tools/picking.sakura
  - tools/writing.sakura

tests:
# How the bindings lay out what they hold, against C's own layouts, and calls of
# the loader, which needs Vulkan's: a desktop's drivers, or the SDK's loader.
- name: malunal.vulkan.tests
  type: program
  deps: [malunal.vulkan, std.testing]
  srcs: [tests/main.sakura, tests/layouts.sakura, tests/loader.sakura]

# What the tool writes of a small registry of the tests' own.
- name: malunal.vulkan.bindings.tests
  type: program
  deps: [std.containers, std.testing, std.xml]
  srcs: [tests/main.sakura, tests/bindings.sakura, tools/registry.sakura, tools/picking.sakura, tools/writing.sakura]

exports:
- malunal.vulkan

package:
  desc: Vulkan for Sakura, written from its registry, vk.xml, by a tool of its own, as C declares it, with its structs laid out as C lays them out.
  auth: John Christman <sorakatadzuma@gmail.com>
