Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/wpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- main
paths:
- "build.zig"
- "src/**/*.zig"
- "src/*.zig"
- "tests/wpt/**"
Expand All @@ -26,6 +27,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]

paths:
- "build.zig"
- "src/**/*.zig"
- "src/*.zig"
- "tests/wpt/**"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/zig-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]

paths:
- "build.zig"
- "src/**/*.zig"
- "src/*.zig"
# Allows you to run this workflow manually from the Actions tab
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/zig-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- main
paths:
- "build.zig"
- "src/**/*.zig"
- "src/*.zig"
- "vendor/jsruntime-lib"
Expand All @@ -21,6 +22,7 @@ on:
types: [opened, synchronize, reopened, ready_for_review]

paths:
- "build.zig"
- "src/**/*.zig"
- "src/*.zig"
- "vendor/**"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Prerequisites

Browsercore is written with [Zig](https://ziglang.org/) `0.11.0`. You have to
Browsercore is written with [Zig](https://ziglang.org/) `0.12`. You have to
install it with the right version in order to build the project.

Browsercore also depends on
Expand Down
12 changes: 3 additions & 9 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pub fn build(b: *std.build.Builder) !void {

// run
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
Expand All @@ -65,12 +64,9 @@ pub fn build(b: *std.build.Builder) !void {
});
try common(shell, options);
try jsruntime_pkgs.add_shell(shell);
// do not install shell binary
b.installArtifact(shell);

// run
const shell_cmd = b.addRunArtifact(shell);
shell_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
shell_cmd.addArgs(args);
}
Expand Down Expand Up @@ -110,7 +106,6 @@ pub fn build(b: *std.build.Builder) !void {

// run
const wpt_cmd = b.addRunArtifact(wpt);
wpt_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
wpt_cmd.addArgs(args);
}
Expand All @@ -133,7 +128,6 @@ pub fn build(b: *std.build.Builder) !void {

// run
const get_cmd = b.addRunArtifact(get);
get_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
get_cmd.addArgs(args);
}
Expand All @@ -143,7 +137,7 @@ pub fn build(b: *std.build.Builder) !void {
}

fn common(
step: *std.Build.CompileStep,
step: *std.Build.Step.Compile,
options: jsruntime.Options,
) !void {
try jsruntime_pkgs.add(step, options);
Expand All @@ -157,7 +151,7 @@ fn linkNetSurf(step: *std.build.LibExeObjStep) void {
step.addIncludePath(.{ .path = "vendor/libiconv/include" });

// netsurf libs
const ns = "vendor/netsurf/";
const ns = "vendor/netsurf";
const libs: [4][]const u8 = .{
"libdom",
"libhubbub",
Expand All @@ -166,7 +160,7 @@ fn linkNetSurf(step: *std.build.LibExeObjStep) void {
};
inline for (libs) |lib| {
step.addObjectFile(.{ .path = ns ++ "/lib/" ++ lib ++ ".a" });
step.addIncludePath(.{ .path = ns ++ lib ++ "/src" });
step.addIncludePath(.{ .path = ns ++ "/" ++ lib ++ "/src" });
}
step.addIncludePath(.{ .path = ns ++ "/include" });
}