From e745b018f87ddc4c8958370332e6cf61625403cc Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Thu, 4 Jun 2026 19:51:32 -0700 Subject: [PATCH] update to zig 0.16.0 --- build.zig | 2 ++ licenses.txt | 9 +++++++++ src/main.zig | 9 +++++---- zig.mod | 2 ++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index c9c16ac67b4ecc9151a3f19302226cdef6d72d15..3e31c5f14db9ae048a23d38e92d21d23d560e0b7 100644 --- a/build.zig +++ b/build.zig @@ -15,6 +15,7 @@ pub fn build(b: *std.Build) void { }), }); deps.addAllTo(exe); + exe.root_module.link_libc = true; exe.use_llvm = !disable_llvm; exe.use_lld = !disable_llvm; b.installArtifact(exe); @@ -36,6 +37,7 @@ pub fn build(b: *std.Build) void { }), }); deps.addAllTo(tests); + tests.root_module.link_libc = true; tests.use_llvm = !disable_llvm; tests.use_lld = !disable_llvm; b.getInstallStep().dependOn(&tests.step); diff --git a/licenses.txt b/licenses.txt index bb14815caeb35036993fb62744405eae256a0944..5e06bf5276948aea364735690bb6da52b5d4399e 100644 --- a/licenses.txt +++ b/licenses.txt @@ -2,3 +2,12 @@ MIT: = https://spdx.org/licenses/MIT - This - git https://github.com/nektro/zig-ansi +- git https://github.com/nektro/zig-extras +- git https://github.com/nektro/zig-sys-darwin +- git https://github.com/nektro/zig-sys-linux +- git https://github.com/nektro/zig-time + +MPL-2.0: += https://spdx.org/licenses/MPL-2.0 +- git https://github.com/nektro/zig-nfs +- git https://github.com/nektro/zig-nio diff --git a/src/main.zig b/src/main.zig index 0073b46b8601748fc72032048a2bcc4ab6bb7770..a5bc786d9c6e13ce96462d47962129cbaa300151 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,16 +1,17 @@ const std = @import("std"); const inquirer = @import("inquirer"); +const nfs = @import("nfs"); // Comparison adaptation of https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/examples/pizza.js pub fn main() !void { std.log.info("All your codebase are belong to us.", .{}); - var gpa = std.heap.GeneralPurposeAllocator(.{}){}; - const alloc = &gpa.allocator; + var gpa = std.heap.DebugAllocator(.{}){}; + const alloc = gpa.allocator(); - const in = std.io.getStdIn().reader(); - const out = std.io.getStdOut().writer(); + const in = nfs.stdin(); + const out = nfs.stdout(); _ = try inquirer.forConfirm(out, in, "Is this for delivery?", alloc); diff --git a/zig.mod b/zig.mod index af7ff2cf20e13216e1876c6738548f4e5f8bb775..3b764d09bf6b314c0d1636f1063eea1ab24abc0d 100644 --- a/zig.mod +++ b/zig.mod @@ -5,3 +5,5 @@ license: MIT description: A collection of utilities for prompting information from the user on the CLI dependencies: - src: git https://github.com/nektro/zig-ansi +root_dependencies: + - src: git https://github.com/nektro/zig-nfs -- 2.54.0