Use json.zig instead of root.zig for lib
This commit is contained in:
parent
438e800f2f
commit
441b50d94b
@ -16,7 +16,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const zigjson_module = b.createModule(.{
|
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);
|
try b.modules.put(b.dupe("zigjson"), zigjson_module);
|
||||||
@ -25,7 +25,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
.name = "zigjson",
|
.name = "zigjson",
|
||||||
// In this case the main source file is merely a path, however, in more
|
// In this case the main source file is merely a path, however, in more
|
||||||
// complicated build scripts, this could be a generated file.
|
// 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,
|
.target = target,
|
||||||
.optimize = optimize,
|
.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
|
// Creates a step for unit testing. This only builds the test executable
|
||||||
// but does not run it.
|
// but does not run it.
|
||||||
const lib_unit_tests = b.addTest(.{
|
const lib_unit_tests = b.addTest(.{
|
||||||
.root_source_file = b.path("src/root.zig"),
|
.root_source_file = b.path("src/json.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user