Invalid protocol xml will still give poor error messages, but that won't
be fixed until there exists a more featureful xml parser for zig which
can report token line/column numbers and whatnot. Until then using
wayland-scanner to validate protocol xml is recommended.
Now only wl_display, wl_registry, and wl_callback are generated by
default (these interfaces are locked to version 1 for eternity).
All other interfaces must be explicitly requested in the program's
build.zig using ScanProtocolsStep.generate(global_name, version).
This ensures forwards compatibility of programs written using
zig-wayland with newer protocol xml.
Instead users should manually create the std.build.Pkg using the new
ScanProtocolsStep.result GeneratedFile. For example:
const wayland = Pkg{
.name = "wayland",
.path = .{ .generated = &scanner.result },
};
This gives users control over the name of the package and will likely
integrate better with future zig build system changes.
This is a (minor) breaking change, the second parameter of
ScanProtocolStep.create() has been removed as it is no longer needed.
This will make packaging zig-wayland much more pleasant.
The simplest and most flexible way to handle things is to stop linking
wayland-client/wayland-server for the user and let them handle it,
always generating bindings for both. This greatly simplifies integration
with projects using both client and server bindings in different
LibExeObjSteps.