13 Commits

Author SHA1 Message Date
Hugo Machet
b9c6fcb8ca docs: Update to addCustomProtocol() in README 2023-09-25 23:32:38 +02:00
Isaac Freund
bdbf7b6b5c docs: Update example in README 2023-08-12 16:03:16 +02:00
Isaac Freund
a956f4461d Update zig version in README 2023-08-09 15:42:57 +02:00
Isaac Freund
717d292d40 Update to zig 0.10.0 2022-11-27 17:42:25 +01:00
Isaac Freund
5336fea583 scanner: improve error handling
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.
2022-05-11 17:22:05 +02:00
Isaac Freund
c9b8c0c424 scanner: require explicit target globals/versions
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.
2022-05-10 23:31:25 +02:00
Isaac Freund
80166ba1d5 Remove ScanProtocolsStep.getPkg()
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.
2021-12-23 18:12:47 +00:00
Isaac Freund
398059895f Update to zig version 0.9.0 2021-12-23 18:12:29 +00:00
Isaac Freund
a8e1efcfd3 Bump zig requirement to 0.8.0 2021-06-05 17:01:45 +00:00
Isaac Freund
4356423568 Specify supported zig version 2021-01-10 20:13:43 +01:00
Isaac Freund
52326e7ee0 Output generated code to zig-cache of host project
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.
2020-12-06 13:48:28 +01:00
Isaac Freund
590773b617 Rethink handling of client vs server linkage
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.
2020-11-01 14:42:53 +01:00
Isaac Freund
f335337bca Add README 2020-11-01 13:53:47 +01:00