diff --git a/build.zig b/build.zig index a35ecd3..21d62ec 100644 --- a/build.zig +++ b/build.zig @@ -4,33 +4,31 @@ pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - // Create library - const reticulumzero = b.addLibrary(.{ - .name = "reticulum-zero", - .linkage = .static, - .root_module = b.createModule(.{ - .root_source_file = b.path("src/root.zig"), - .target = target, - .optimize = optimize, - }), - }); - - // Output library object - b.installArtifact(reticulumzero); - - // Expose library as a module - try b.modules.put(b.dupe("reticulum-zero"), reticulumzero.root_module); - - // Set up unit testing - const unit_tests = b.addTest(.{ + // Create root module + const root_module = b.createModule(.{ .root_source_file = b.path("src/root.zig"), .target = target, .optimize = optimize, }); - const run_unit_tests = b.addRunStep(unit_tests); + // Create library + const lib = b.addLibrary(.{ + .name = "reticulum-zero", + .linkage = .static, + .root_module = root_module, + }); + + // Output library object + b.installArtifact(lib); + + // Set up unit testing + // const unit_tests = b.addTest(.{ + // .root_module = root_module, + // }); + + // const run_unit_tests = b.addRunStep(unit_tests); // `zig build test` command - const test_step = b.step("test", "Run library unit tests"); - test_step.dependency(&run_unit_tests.step); + // const test_step = b.step("test", "Run library unit tests"); + // test_step.dependency(&run_unit_tests.step); } diff --git a/build.zig.zon b/build.zig.zon index d123225..acb7a37 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,7 +1,8 @@ .{ - .name = "reticulum-zero", + .name = .reticulumzero, .version = "0.0.0", .minimum_zig_version = "0.16.0", + .fingerprint = 0x7bbb9f9a7c7a4705, .dependencies = .{}, .paths = .{ "build.zig", diff --git a/src/root.zig b/src/root.zig index ad85c39..9b202f1 100644 --- a/src/root.zig +++ b/src/root.zig @@ -1 +1 @@ -const packet = @import("packet.zig"); +pub const packet = @import("packet.zig");