Skip to content

Commit

Permalink
var -> const and other build fixes (#18)
Browse files Browse the repository at this point in the history
* Update var to const in build.zig where applicable

This no longer builds with the latest version of Zig.

See: ziglang/zig#18017

* Update zig-wcwidth

This includes fixes to make build.zig build again.

* Add now-required paths field to build.zig.zon
  • Loading branch information
linusg authored Nov 26, 2023
1 parent f178d49 commit 6e351c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn build(b: *Build) void {
b.installArtifact(lib);

// Tests
var main_tests = b.addTest(.{
const main_tests = b.addTest(.{
.name = "main-tests",
.root_source_file = FileSource.relative("src/main.zig"),
.target = target,
Expand Down
14 changes: 12 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
.version = "0.1.0",
.dependencies = .{
.wcwidth = .{
.url = "https://github.com/joachimschmidt557/zig-wcwidth/archive/2d4055f63646ebc88503fe01940dd11ad535c1dc.tar.gz",
.hash = "122007ac41a9484316323499e55dc0b2fa9fdaffd9452933602552c631cf98d9ff72",
.url = "https://github.com/joachimschmidt557/zig-wcwidth/archive/7fc06445d17beb94fe06ad0d60d636e40fe8490a.tar.gz",
.hash = "1220ae6991b133c3c0f9b8989ee15f26d02f44a21ef5d77ca1e8c3232356cb45d51b",
},
},
.paths = .{
"LICENSE",
"README.md",
"build.zig",
"build.zig.zon",
"history.txt",
"examples/",
"includes/",
"src/",
},
}

0 comments on commit 6e351c6

Please sign in to comment.