2 ms·
I just looked at one example...Wayland's meson.build is 142 LOC, but build.zig is 581. https://github.com/allyourcodebase/wayland/blob/master/build.zig https:/
by jeremyjh 3mo ago
I just looked at one example...Wayland's meson.build is 142 LOC, but build.zig is 581.
https://github.com/allyourcodebase/wayland/blob/master/build.zig https://github.com/allyourcodebase/wayland/blob/master/build...
https://github.com/wayland-mirror/wayland/blob/main/meson.build https://github.com/wayland-mirror/wayland/blob/main/meson.bu...
- gregdaniels421 3mo agoThe Zig is far more explicit about what it is doing with lots of very long dotted commands for specifiy version headers and such, so maybe not super fair unless you like magic.
- jeremyjh 3mo agoWhats an example of magic in the meson.build that you don't understand? I think this is the first meson.build I've ever looked at and it seems very straightforward.
- pmarreck 3mo ago[flagged]
- gregdaniels421 3mo agoDidn't say I didn't understand it, I just said it was less explicit. Read through the Zig and it is super clear what every step is doing, and it sets things much more explicitly than the meson build ``` const wayland_version_header = b.addConfigHeader(.{ .style = .{ .cmake = upstream.path("src/wayland-version.h.in") }, }, .{ .WAYLAND_VERSION_MAJOR = @as(i64, @intCast(version.major)), .WAYLAND_VERSION_MINOR = @as(i64, @intCast(version.minor)), .WAYLAND_VERSION_MICRO = @as(i64, @intCast(version.patch)), .WAYLAND_VERSION = b.fmt("{f}", .{version}), }); ``` which is doing some config automake work. Which Meson does implicitly(magically).
- wavesquid 3mo agoThe meson build is across multiple files, you should add together: meson.build meson_options.txt doc/meson.build egl/meson.build src/meson.build tests/meson.build cursor/meson.build doc/doxygen/meson.build doc/publican/meson.build doc/doxygen/xml/meson.build doc/publican/sources/meson.build doc/doxygen/xml/Client/meson.build doc/doxygen/xml/Server/meson.build
- jeremyjh 3mo agoWell then, nevermind.
- tomjakubowski 3mo agoThe build.zig doesn't build anything from the doc or tests folders. Otherwise, yeah.