diff options
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | build.zig | 10 | ||||
| -rw-r--r-- | build.zig.zon | 12 | ||||
| -rw-r--r-- | src/Installation.zig | 2 | ||||
| -rw-r--r-- | src/main.zig | 4 |
5 files changed, 19 insertions, 13 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | *~ | 1 | *~ |
| 2 | zig-cache/** | 2 | .zig-cache/ |
| 3 | zig-out/** | 3 | zig-out/ |
| 4 | README.html | 4 | README.html |
| 5 | .DS_Store | 5 | .DS_Store |
| @@ -20,7 +20,10 @@ pub fn build(b: *Build) void { | |||
| 20 | const exe = b.addExecutable(.{ | 20 | const exe = b.addExecutable(.{ |
| 21 | .name = "zup", | 21 | .name = "zup", |
| 22 | .version = version, | 22 | .version = version, |
| 23 | .root_source_file = .{ .path = "src/main.zig" }, | 23 | .root_source_file = .{ .src_path = .{ |
| 24 | .owner = b, | ||
| 25 | .sub_path = "src/main.zig", | ||
| 26 | } }, | ||
| 24 | .target = target, | 27 | .target = target, |
| 25 | .optimize = optimize, | 28 | .optimize = optimize, |
| 26 | }); | 29 | }); |
| @@ -40,7 +43,10 @@ pub fn build(b: *Build) void { | |||
| 40 | run_step.dependOn(&run_cmd.step); | 43 | run_step.dependOn(&run_cmd.step); |
| 41 | 44 | ||
| 42 | const exe_tests = b.addTest(.{ | 45 | const exe_tests = b.addTest(.{ |
| 43 | .root_source_file = .{ .path = "src/main.zig" }, | 46 | .root_source_file = .{ .src_path = .{ |
| 47 | .owner = b, | ||
| 48 | .sub_path = "src/main.zig", | ||
| 49 | } }, | ||
| 44 | .target = target, | 50 | .target = target, |
| 45 | .optimize = optimize, | 51 | .optimize = optimize, |
| 46 | }); | 52 | }); |
diff --git a/build.zig.zon b/build.zig.zon index aed6a59..2d7a69c 100644 --- a/build.zig.zon +++ b/build.zig.zon | |||
| @@ -5,16 +5,16 @@ | |||
| 5 | .paths = .{""}, | 5 | .paths = .{""}, |
| 6 | .dependencies = .{ | 6 | .dependencies = .{ |
| 7 | .clap = .{ | 7 | .clap = .{ |
| 8 | .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-0.8.0.tar.xz", | 8 | .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-0.9.1.tar.xz", |
| 9 | .hash = "1220949d4e88864579067b6d4cdad6476c6176f27e782782c2c39b7f2c4817a10efb", | 9 | .hash = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b", |
| 10 | }, | 10 | }, |
| 11 | .libarchive = .{ | 11 | .libarchive = .{ |
| 12 | .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-0.3.0.tar.xz", | 12 | .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-0.4.0.tar.xz", |
| 13 | .hash = "1220d8262d35559168d67d60797829a36958320556b277cd0e701a34eb00880461ab", | 13 | .hash = "1220b21cc99fca50b7fa495191a17abe440dc8229aa3bc5a638c4a0f2ffdceccbdda", |
| 14 | }, | 14 | }, |
| 15 | .xdg = .{ | 15 | .xdg = .{ |
| 16 | .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-0.3.0.tar.xz", | 16 | .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-0.4.0.tar.xz", |
| 17 | .hash = "1220e214475ea8ff31ac110f593be121663eefdca27d19508d0c96bc49f47c31756f", | 17 | .hash = "12206c1b6e163e79b83eb1e6cb1d575b256e603a0bbf9c2726e6f3235028eabbff41", |
| 18 | }, | 18 | }, |
| 19 | }, | 19 | }, |
| 20 | } | 20 | } |
diff --git a/src/Installation.zig b/src/Installation.zig index 6565263..6e2e120 100644 --- a/src/Installation.zig +++ b/src/Installation.zig | |||
| @@ -5,7 +5,7 @@ const zup = @import("root"); | |||
| 5 | const Allocator = std.mem.Allocator; | 5 | const Allocator = std.mem.Allocator; |
| 6 | const ArenaAllocator = std.heap.ArenaAllocator; | 6 | const ArenaAllocator = std.heap.ArenaAllocator; |
| 7 | const Config = zup.Config; | 7 | const Config = zup.Config; |
| 8 | const ChildProcess = std.ChildProcess; | 8 | const ChildProcess = std.process.Child; |
| 9 | const EasyHttp = zup.EasyHttp; | 9 | const EasyHttp = zup.EasyHttp; |
| 10 | const JsonValue = std.json.Value; | 10 | const JsonValue = std.json.Value; |
| 11 | const SemanticVersion = std.SemanticVersion; | 11 | const SemanticVersion = std.SemanticVersion; |
diff --git a/src/main.zig b/src/main.zig index f5b6c1e..57baac1 100644 --- a/src/main.zig +++ b/src/main.zig | |||
| @@ -16,8 +16,8 @@ const std = @import("std"); | |||
| 16 | const zup_config = @import("zup-config"); | 16 | const zup_config = @import("zup-config"); |
| 17 | 17 | ||
| 18 | const ArgIterator = std.process.ArgIterator; | 18 | const ArgIterator = std.process.ArgIterator; |
| 19 | const ComptimeStringMap = std.ComptimeStringMap; | ||
| 20 | const GPA = std.heap.GeneralPurposeAllocator(.{}); | 19 | const GPA = std.heap.GeneralPurposeAllocator(.{}); |
| 20 | const StaticStringMap = std.StaticStringMap; | ||
| 21 | const Tuple = std.meta.Tuple; | 21 | const Tuple = std.meta.Tuple; |
| 22 | 22 | ||
| 23 | pub fn main() !void { | 23 | pub fn main() !void { |
| @@ -65,7 +65,7 @@ const CommandMap = blk: { | |||
| 65 | idx += 1; | 65 | idx += 1; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | break :blk ComptimeStringMap(Command, map_data); | 68 | break :blk StaticStringMap(Command).initComptime(map_data); |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | fn dispatch( | 71 | fn dispatch( |