From d256e8e2d5d2ff89e801000164dd5f78b50af605 Mon Sep 17 00:00:00 2001 From: Davy Duperron Date: Wed, 4 Sep 2024 18:55:53 +0200 Subject: [PATCH] revert(bench): revert bench in build and remove top-level doc --- build.zig | 28 ++++++++++++++-------------- src/bench.zig | 2 -- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/build.zig b/build.zig index 7869046..fc69023 100644 --- a/build.zig +++ b/build.zig @@ -68,19 +68,19 @@ pub fn build(b: *std.Build) void { check_step.dependOn(&check.step); // Bench step. - // const bench_step = b.step("bench", "Run benchmarks"); - // const bench_exe = b.addExecutable(.{ - // .name = "bench", - // .root_source_file = b.path("src/bench.zig"), - // .target = target, - // .optimize = .ReleaseFast, - // }); - // const bench_run = b.addRunArtifact(bench_exe); - // if (b.args) |args| { - // bench_run.addArgs(args); - // } - // bench_step.dependOn(&bench_run.step); - // b.default_step.dependOn(bench_step); + const bench_step = b.step("bench", "Run benchmarks"); + const bench_exe = b.addExecutable(.{ + .name = "bench", + .root_source_file = b.path("src/bench.zig"), + .target = target, + .optimize = .ReleaseFast, + }); + const bench_run = b.addRunArtifact(bench_exe); + if (b.args) |args| { + bench_run.addArgs(args); + } + bench_step.dependOn(&bench_run.step); + b.default_step.dependOn(bench_step); if (b.lazyDependency("uuid", .{ .target = target, @@ -88,6 +88,6 @@ pub fn build(b: *std.Build) void { })) |dep| { unit_tests.root_module.addImport("uuid", dep.module("uuid")); check.root_module.addImport("uuid", dep.module("uuid")); - // bench_exe.root_module.addImport("uuid", dep.module("uuid")); + bench_exe.root_module.addImport("uuid", dep.module("uuid")); } } diff --git a/src/bench.zig b/src/bench.zig index da5e241..1fd81cd 100644 --- a/src/bench.zig +++ b/src/bench.zig @@ -1,5 +1,3 @@ -//! Benchmarks for HyperZig. - const std = @import("std"); const uuid = @import("uuid"); const hyperzig = @import("hyperzig.zig");