Skip to content

Commit

Permalink
build: Add module import support
Browse files Browse the repository at this point in the history
  • Loading branch information
mookums authored Oct 14, 2024
1 parent b0f5bf3 commit 1a55cb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

_ = b.addModule("jaysan", .{
.root_source_file = b.path("./src/main.zig"),
.target = target,
.optimize = optimize,
});

const exe_unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
Expand Down
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const std = @import("std");

const json = struct {
pub const json = struct {
pub fn stringify(value: anytype, writer: std.io.AnyWriter) !void {
const T = @TypeOf(value);
if (isString(T, value)) {
Expand Down

0 comments on commit 1a55cb3

Please sign in to comment.