pub fn build(b: *@import("std").Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});

    const aether = b.addModule("discord.zig", .{
        .root_source_file = b.path("root.zig"),
        .link_libc = true,
    });

    _ = b.addStaticLibrary(.{
        .name = "aether",
        .root_source_file = b.path("root.zig"),
        .target = target,
        .optimize = optimize,
    });

    const benchmarks = b.addExecutable(.{
        .name = "benchmarks",
        .root_source_file = b.path("benchmarks/main.zig"),
        .target = target,
        .optimize = optimize,
    });

    const zbench_module = b.dependency("zbench", .{}).module("zbench");

    benchmarks.root_module.addImport("aether", aether);
    benchmarks.root_module.addImport("zbench", zbench_module);
    b.installArtifact(benchmarks);

    const benchmarks_cmd = b.addRunArtifact(benchmarks);
    benchmarks_cmd.step.dependOn(b.getInstallStep());

    const benchmarks_step = b.step("benchmarks", "Run the benchmarks");
    benchmarks_step.dependOn(&benchmarks_cmd.step);
}
