| author | |
| committer | |
| log | e745b018f87ddc4c8958370332e6cf61625403cc |
| tree | 43429a304364573b633937b3013d0811e413e9dd |
| parent | eabf5769b1aa90dd7fde2da998ed3e264a8a4df8 |
| signature |
4 files changed, 18 insertions(+), 4 deletions(-)
build.zig+2| ... | ... | @@ -15,6 +15,7 @@ pub fn build(b: *std.Build) void { |
| 15 | 15 | }), |
| 16 | 16 | }); |
| 17 | 17 | deps.addAllTo(exe); |
| 18 | exe.root_module.link_libc = true; | |
| 18 | 19 | exe.use_llvm = !disable_llvm; |
| 19 | 20 | exe.use_lld = !disable_llvm; |
| 20 | 21 | b.installArtifact(exe); |
| ... | ... | @@ -36,6 +37,7 @@ pub fn build(b: *std.Build) void { |
| 36 | 37 | }), |
| 37 | 38 | }); |
| 38 | 39 | deps.addAllTo(tests); |
| 40 | tests.root_module.link_libc = true; | |
| 39 | 41 | tests.use_llvm = !disable_llvm; |
| 40 | 42 | tests.use_lld = !disable_llvm; |
| 41 | 43 | b.getInstallStep().dependOn(&tests.step); |
licenses.txt+9| ... | ... | @@ -2,3 +2,12 @@ MIT: |
| 2 | 2 | = https://spdx.org/licenses/MIT |
| 3 | 3 | - This |
| 4 | 4 | - git https://github.com/nektro/zig-ansi |
| 5 | - git https://github.com/nektro/zig-extras | |
| 6 | - git https://github.com/nektro/zig-sys-darwin | |
| 7 | - git https://github.com/nektro/zig-sys-linux | |
| 8 | - git https://github.com/nektro/zig-time | |
| 9 | ||
| 10 | MPL-2.0: | |
| 11 | = https://spdx.org/licenses/MPL-2.0 | |
| 12 | - git https://github.com/nektro/zig-nfs | |
| 13 | - git https://github.com/nektro/zig-nio |
src/main.zig+5-4| ... | ... | @@ -1,16 +1,17 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const inquirer = @import("inquirer"); |
| 3 | const nfs = @import("nfs"); | |
| 3 | 4 | |
| 4 | 5 | // Comparison adaptation of https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/examples/pizza.js |
| 5 | 6 | |
| 6 | 7 | pub fn main() !void { |
| 7 | 8 | std.log.info("All your codebase are belong to us.", .{}); |
| 8 | 9 | |
| 9 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
| 10 | const alloc = &gpa.allocator; | |
| 10 | var gpa = std.heap.DebugAllocator(.{}){}; | |
| 11 | const alloc = gpa.allocator(); | |
| 11 | 12 | |
| 12 | const in = std.io.getStdIn().reader(); | |
| 13 | const out = std.io.getStdOut().writer(); | |
| 13 | const in = nfs.stdin(); | |
| 14 | const out = nfs.stdout(); | |
| 14 | 15 | |
| 15 | 16 | _ = try inquirer.forConfirm(out, in, "Is this for delivery?", alloc); |
| 16 | 17 |
zig.mod+2| ... | ... | @@ -5,3 +5,5 @@ license: MIT |
| 5 | 5 | description: A collection of utilities for prompting information from the user on the CLI |
| 6 | 6 | dependencies: |
| 7 | 7 | - src: git https://github.com/nektro/zig-ansi |
| 8 | root_dependencies: | |
| 9 | - src: git https://github.com/nektro/zig-nfs |