Use json.zig instead of root.zig for lib

This commit is contained in:
Cameron Reed 2024-11-02 09:29:25 -06:00
parent 438e800f2f
commit 441b50d94b

View File

@ -16,7 +16,7 @@ pub fn build(b: *std.Build) !void {
const optimize = b.standardOptimizeOption(.{});
const zigjson_module = b.createModule(.{
.root_source_file = b.path("src/root.zig"),
.root_source_file = b.path("src/json.zig"),
});
try b.modules.put(b.dupe("zigjson"), zigjson_module);
@ -25,7 +25,7 @@ pub fn build(b: *std.Build) !void {
.name = "zigjson",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = b.path("src/root.zig"),
.root_source_file = b.path("src/json.zig"),
.target = target,
.optimize = optimize,
});
@ -73,7 +73,7 @@ pub fn build(b: *std.Build) !void {
// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const lib_unit_tests = b.addTest(.{
.root_source_file = b.path("src/root.zig"),
.root_source_file = b.path("src/json.zig"),
.target = target,
.optimize = optimize,
});