diff options
| author | David Czihak <git@dcz.at> | 2026-05-09 13:01:50 +0200 |
|---|---|---|
| committer | David Czihak <git@dcz.at> | 2026-05-09 13:01:50 +0200 |
| commit | 4b6f66fd512c254b5a82220dc77411fe391dd258 (patch) | |
| tree | 7d77d7966e9ad2e296986ea8cfeb607088028195 /examples/build-options/src | |
| parent | 64e9c56fc665972fdde5234c4fb2f2a882e237dc (diff) | |
Chore: Rework examples for thorough extension testing
Diffstat (limited to 'examples/build-options/src')
| -rw-r--r-- | examples/build-options/src/main.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/build-options/src/main.zig b/examples/build-options/src/main.zig new file mode 100644 index 0000000..5bab011 --- /dev/null +++ b/examples/build-options/src/main.zig @@ -0,0 +1,15 @@ +const std = @import("std"); +const opts = @import("build_options"); + +pub fn main(init: std.process.Init) !void { + const io = init.io; + var buf: [1024]u8 = undefined; + var fw: std.Io.File.Writer = .init(.stdout(), io, &buf); + defer fw.interface.flush() catch {}; + const w = &fw.interface; + + try w.print("verbose = {}\n", .{opts.verbose}); + try w.print("port = {d}\n", .{opts.port}); + try w.print("backend = {s}\n", .{@tagName(opts.backend)}); + try w.print("max_conn = {d}\n", .{opts.max_conn}); +} |
