#httpz blocking mode build option, how to enable?

1 messages · Page 1 of 1 (latest)

rose yarrow
#

https://github.com/karlseguin/http.zig?tab=readme-ov-file#blocking-mode
They have something like this in build.zig:

{
    const options = b.addOptions();
    options.addOption(bool, "httpz_blocking", false);
    httpz_module.addOptions("build", options);
}

How to enable this? I tried

const httpz = b.dependency("httpz", .{
    .target = target,
    .optimize = optimize,
    .httpz_blocking = true,
});

and also zig build run -Dhttpz_blocking=true
But httpz.blockingMode() keep returning false

marsh haven
#

b.addOptions() does not necessarily create a user-configurable option. In this case, it looks like it is hard coded to "false" in the build script

#

(Nope, that is just for tests)

rigid finch
#

If you/they wished to reveal the option to 'zig build -h' you'd have to additionally use build.option()