update zig to 0.8.0 (#279)

zig 0.8.0 got released, so this pr updates it
This commit is contained in:
g-w1 2021-06-15 21:25:12 -04:00 committed by GitHub
parent 7d40abfb3f
commit c0b218f477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 1 deletions

View File

@ -7,4 +7,4 @@ curl -L "https://ziglang.org/download/0.7.1/zig-linux-x86_64-0.7.1.tar.xz" -o zi
tar xf zig.tar.xz --strip-components=1
rm zig.tar.xz
cd ../
cd ../

10
packages/zig/0.8.0/build.sh vendored Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
mkdir -p bin
cd bin/
curl -L "https://ziglang.org/download/0.8.0/zig-linux-x86_64-0.8.0.tar.xz" -o zig.tar.xz
tar xf zig.tar.xz --strip-components=1
rm zig.tar.xz
cd ../

6
packages/zig/0.8.0/compile vendored Normal file
View File

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

4
packages/zig/0.8.0/environment vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# compiler path
export PATH=$PWD/bin:$PATH

5
packages/zig/0.8.0/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "zig",
"version": "0.8.0",
"aliases": ["zig"]
}

4
packages/zig/0.8.0/run vendored Normal file
View File

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

6
packages/zig/0.8.0/test.zig vendored Normal file
View File

@ -0,0 +1,6 @@
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("OK\n", .{});
}