Source
pub fn step(b: *Build, name: []const u8, description: []const u8) *Step {
const step_info = b.allocator.create(TopLevelStep) catch @panic("OOM");
step_info.* = .{
.step = Step.init(.{
.id = TopLevelStep.base_id,
.name = name,
.owner = b,
}),
.description = b.dupe(description),
};
const gop = b.top_level_steps.getOrPut(b.allocator, name) catch @panic("OOM");
if (gop.found_existing) std.debug.panic("A top-level step with name \"{s}\" already exists", .{name});
gop.key_ptr.* = step_info.step.name;
gop.value_ptr.* = step_info;
return &step_info.step;
}