Something went wrong. Try again.
keystore jetzig.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061const std = @import("std");
pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const options = b.addOptions(); options.addOption( bool, "skip-valkey", b.option( bool, "skip-valkey", "Skip valkey tests", ) orelse false, ); const build_options = options.createModule();
const zqlite = b.dependency("zqlite", .{ .target = target, .optimize = optimize, }).module("zqlite");
const mod = b.addModule("jetkv", .{ .root_source_file = b.path("src/root.zig"), .target = target, .imports = &.{ .{ .name = "zqlite", .module = zqlite }, .{ .name = "build_options", .module = build_options }, }, });
const exe = b.addExecutable(.{ .name = "benchmark", .use_llvm = false, .root_module = b.createModule(.{ .root_source_file = b.path("src/benchmark.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "zqlite", .module = zqlite }, .{ .name = "build_options", .module = build_options }, }, }), });
b.installArtifact(exe); const run = b.addRunArtifact(exe); const run_step = b.step("benchmark", "Run"); run_step.dependOn(&run.step);
const test_step = b.step("test", "Run unit tests"); test_step.dependOn( &b.addRunArtifact( b.addTest(.{ .name = "jetkv", .root_module = mod, }), ).step, );}