Skip to content

Commit

Permalink
Merge pull request #9 from lun-4/zigpkg
Browse files Browse the repository at this point in the history
port to zig package manager
  • Loading branch information
kivikakk authored Jun 9, 2024
2 parents 14a3eba + 6109283 commit bde012f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/zig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
submodules: recursive
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.12.0
version: 0.13.0
- run: zig build
- run: zig build test
lint:
Expand All @@ -27,5 +27,5 @@ jobs:
submodules: recursive
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.12.0
version: 0.13.0
- run: zig fmt --check build.zig src/*.zig
11 changes: 9 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ pub fn build(b: *std.Build) !void {

const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

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

const lib = b.addStaticLibrary(.{
.name = "htmlentities.zig",
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.optimize = optimize,
.target = target,
});
b.installArtifact(lib);

var main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.optimize = optimize,
});

Expand Down
15 changes: 15 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.{
.name = "htmlentities.zig",
.version = "0.1.0",
.minimum_zig_version = "0.12.0",
.dependencies = .{},

.paths = .{
"entities.json",
"build.zig",
"build.zig.zon",
"src",
"LICENSE",
"README.md",
},
}

0 comments on commit bde012f

Please sign in to comment.