Build is working again (on Zig master branch)

Re-added specifying thread count doing something
Added single-threaded performance to benchmark.sh
Added single-threaded test (currently getting stuck forever)
Various minor fixes revealed now that build is working again.
This commit is contained in:
Caleb Gardner
2026-05-24 06:47:50 -05:00
parent 3ea3d8e9a0
commit 5975bbb4a2
17 changed files with 311 additions and 202 deletions
+2 -9
View File
@@ -5,8 +5,6 @@ const Writer = std.Io.Writer;
const ExtractionOptions = @This();
// /// The number of threads used for extraction. 0 implies single threaded.
// threads: usize = 1, // As of Zig 0.16 this should no longer be necessary, instead this should be set by the io instance used.
/// Don't set the file's owner & permissions after extraction
ignore_permissions: bool = false,
/// Don't set xattr values. Currently xattrs are never set anyway.
@@ -18,16 +16,11 @@ verbose: bool = false,
/// Where to print verbose log.
verbose_writer: ?*Writer = null,
pub const SingleThreadedDefault: ExtractionOptions = .{};
pub fn Default() !ExtractionOptions {
return .{
.threads = try std.Thread.getCpuCount(),
};
}
pub const default: ExtractionOptions = .{};
pub fn VerboseDefault(wrt: *Writer) !ExtractionOptions {
return .{
.verbose = true,
.verbose_writer = wrt,
.threads = try std.Thread.getCpuCount(),
};
}