Skip to content

Commit ebce064

Browse files
committed
ugprade to zig 0.13
1 parent 9ad6e70 commit ebce064

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

.github/actions/install/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
zig:
66
description: 'Zig version to install'
77
required: false
8-
default: '0.12.1'
8+
default: '0.13.0'
99
arch:
1010
description: 'CPU arch used to select the v8 lib'
1111
required: false
@@ -17,7 +17,7 @@ inputs:
1717
zig-v8:
1818
description: 'zig v8 version to install'
1919
required: false
20-
default: 'v0.1.5'
20+
default: 'v0.1.6'
2121
v8:
2222
description: 'v8 version to install'
2323
required: false

.github/workflows/zig-fmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: zig-fmt
22

33
env:
4-
ZIG_VERSION: 0.12.1
4+
ZIG_VERSION: 0.13.0
55

66
on:
77
pull_request:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
zig-cache
22
zig-out
3-
vendor/v8
3+
/.zig-cache/
4+
vendor/v8

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ exit with Ctrl+D or "exit"
153153

154154
### Prerequisites
155155

156-
zig-js-runtime is written with [Zig](https://ziglang.org/) `0.12.1`. You have to
156+
zig-js-runtime is written with [Zig](https://ziglang.org/) `0.13.0`. You have to
157157
install it with the right version in order to build the project.
158158

159159
To be able to build the v8 engine, you have to install some libs:

build.zig

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const pkgs = packages("");
1919

2020
/// Do not rename this constant. It is scanned by some scripts to determine
2121
/// which zig version to install.
22-
pub const recommended_zig_version = "0.12.1";
22+
pub const recommended_zig_version = "0.13.0";
2323

2424
pub fn build(b: *std.Build) !void {
2525
switch (comptime builtin.zig_version.order(std.SemanticVersion.parse(recommended_zig_version) catch unreachable)) {
@@ -49,7 +49,19 @@ pub fn build(b: *std.Build) !void {
4949
const bench = b.addExecutable(.{
5050
.name = "zig-js-runtime-bench",
5151
.root_source_file = b.path("src/main_bench.zig"),
52-
.single_threaded = true,
52+
53+
// Threads are now required to compile using libc++.
54+
// This change happens when upgrading to zig 0.13.0
55+
//
56+
// With Single thread, I have the following error:
57+
// > error: sub-compilation of libcxx failed
58+
// > /usr/local/zig-0.13.0/lib/libcxx/include/future:368:4: note:
59+
// >"<future> is not supported since libc++ has been configured without
60+
// > support for threads."
61+
//
62+
// see https://github.com/llvm/llvm-project/issues/76588
63+
.single_threaded = false,
64+
5365
.target = target,
5466
.optimize = mode,
5567
});

0 commit comments

Comments
 (0)