Skip to content

Commit 961435b

Browse files
authored
Merge pull request #518 from Deecellar/master
Updated Zig to 0.9.1
2 parents 0257676 + 17217c0 commit 961435b

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

packages/zig/0.9.1/build.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
mkdir -p bin
4+
cd bin/
5+
6+
curl -L "https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz" -o zig.tar.xz
7+
tar xf zig.tar.xz --strip-components=1
8+
rm zig.tar.xz
9+
10+
cd ../

packages/zig/0.9.1/compile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
# optimizing for small programs
4+
rename 's/$/\.zig/' "$@" # Add .zig extension
5+
6+
zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig

packages/zig/0.9.1/environment

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
# compiler path
4+
export PATH=$PWD/bin:$PATH

packages/zig/0.9.1/metadata.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"language": "zig",
3+
"version": "0.9.1",
4+
"aliases": ["zig"],
5+
"limit_overrides": {
6+
"compile_timeout": 15000
7+
}
8+
}

packages/zig/0.9.1/run

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
shift # Filename is only used in compile step, so we can take it out here
4+
./out "$@"

packages/zig/0.9.1/test.zig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const std = @import("std");
2+
3+
pub fn main() !void {
4+
const stdout = std.io.getStdOut().writer();
5+
try stdout.print("OK\n", .{});
6+
}

0 commit comments

Comments
 (0)