Skip to content

Commit 4f50860

Browse files
committedAug 21, 2024
chore: get it to build again
1 parent 8062b30 commit 4f50860

File tree

239 files changed

+61
-87502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+61
-87502
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
zig-cache
2+
.zig-cache
23
zig-out
34
docs/draft/*

‎build.zig

+12-29
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
11
const std = @import("std");
2-
const Builder = std.build.Builder;
32

4-
const linkPcre = @import("vendor/koino/vendor/libpcre/build.zig").linkPcre;
3+
pub fn build(b: *std.Build) void {
4+
const optimize = b.standardOptimizeOption(.{});
5+
const target = b.standardTargetOptions(.{});
6+
const exe = b.addExecutable(.{
7+
.name = "zmd",
8+
.root_source_file = b.path("src/main.zig"),
9+
.target = target,
10+
.optimize = optimize,
11+
});
512

6-
const pkgs = struct {
7-
const koino = std.build.Pkg{
8-
.name = "koino",
9-
.source = std.build.FileSource{ .path = "vendor/koino/src/koino.zig" },
10-
.dependencies = &[_]std.build.Pkg{
11-
std.build.Pkg{ .name = "libpcre", .source = std.build.FileSource{ .path = "vendor/koino/vendor/libpcre/src/main.zig" } },
12-
std.build.Pkg{ .name = "htmlentities", .source = std.build.FileSource{ .path = "vendor/koino/vendor/htmlentities/src/main.zig" } },
13-
std.build.Pkg{ .name = "clap", .source = std.build.FileSource{ .path = "vendor/koino/vendor/zig-clap/clap.zig" } },
14-
std.build.Pkg{ .name = "zunicode", .source = std.build.FileSource{ .path = "vendor/koino/vendor/zunicode/src/zunicode.zig" } },
15-
},
16-
};
17-
};
13+
const koino_pkg = b.dependency("koino", .{ .optimize = optimize, .target = target });
14+
exe.root_module.addImport("koino", koino_pkg.module("koino"));
1815

19-
pub fn build(b: *Builder) void {
20-
const mode = b.standardReleaseOptions();
21-
const exe = b.addExecutable("zmd", "src/main.zig");
22-
23-
exe.addPackage(pkgs.koino);
24-
try linkPcre(exe);
25-
26-
exe.setBuildMode(mode);
27-
exe.install();
28-
29-
const run_cmd = exe.run();
30-
run_cmd.step.dependOn(b.getInstallStep());
31-
32-
const run_step = b.step("run", "Run the app");
33-
run_step.dependOn(&run_cmd.step);
16+
b.installArtifact(exe);
3417
}

0 commit comments

Comments
 (0)