DE version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
64% Positive
Analyzed from 837 words in the discussion.
Trending Topics
#build#zig#meson#bazel#more#system#https#doc#github#wayland

Discussion (14 Comments)Read Original on HackerNews
The HAVE_/WITH_ defines are supposed to be dynamically probed to adapt to different toolchain environments, setting them manually like that[1][2][3] could only work well for specific targets and for specific versions.
[1] https://github.com/allyourcodebase/libxml2/blob/38fb69d375bc...
[2] https://github.com/allyourcodebase/rnnoise/blob/47db9c212d7e...
[3] https://github.com/allyourcodebase/wayland/blob/f992cd71e199...
I had the impression `zig` already has stuff like `zig cc`. Would... would `zig make` be an impossible proposition? Maybe that makes no sense.
With that said, Zig falls well short when dependencies have more involved build systems that are too obnoxious to recreate, eg: libevent. I have a bit of a sentimental attachment to libevent and would love to use it within my Zig projects, but the only viable options are: 1) dynamically link; 2) have two [or more] separate build steps; or 3) wait until allyourcodebase does the obnoxious work for me. None of which are appealing so I end up using different libraries just for the build-system integration. And by their nature of being Zig libraries, they're usually less known, less battle-tested, and riskier to use because it's more likely to be some random guy's side project.
Putting aside the StackOverflow tier "why would you ever do/want that?" troll argument, the issue is that I'm being obstructed from using the libraries I want to use over build system incompatibilities. It feels somewhat similar to the complaint about having two [or more] languages within the same codebase.
I haven't kept my zig skills sharp enough but zig build and the build.zig file basically lets you create a dag of steps and create various targets. It's basically make but the programming language is zig itself and the associated code happens to be in the standard library.
https://ziglang.org/documentation/0.16.0/std/#std.Build
https://ziglang.org/learn/build-system/
Can you tell me more about this? I’ve never used Bazel. I have used Buck extensively. But have never used either in an open source context.
The gist of it is something like:
- Bazel community hits a problem with something like how npm behaves around paths
- Bazel's solution is to create a patching system around paths to resolve them
- rinse and repeat for every piece of tooling us "normies" are using
The end result is that instead of Bazel's efforts showing up in the base tooling, they build up a bunch of their own tooling and patches, and the underlying tools don't get really much if any benefit. Moving to Bazel still is a PITA, and there's a lack of improving onramps
In an alternate universe when people in Bazel land hit issues they would show up with patches and recommendations _to the underlying tools_ to get things merged in so that the workflows can be better supported across the board.
I don't think anyone working on Bazel is against upstreaming, but I think they discount the value of it because, hey, _they_ can get patches and hacks working for their flow
https://github.com/allyourcodebase/wayland/blob/master/build... https://github.com/wayland-mirror/wayland/blob/main/meson.bu...
``` 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).