pkg(zig-0.7.1): Add zig 0.7.1
This commit is contained in:
parent
7c67be39b0
commit
fb95a4dbc0
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p bin
|
||||
cd bin/
|
||||
|
||||
curl -L "https://ziglang.org/download/0.7.1/zig-linux-x86_64-0.7.1.tar.xz" -o zig.tar.xz
|
||||
tar xf zig.tar.xz --strip-components=1
|
||||
rm zig.tar.xz
|
||||
|
||||
cd ../
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# optimizing for small programs
|
||||
zig build-exe -O ReleaseSmall --color off --cache-dir . --global-cache-dir . --name out "$@"
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# compiler path
|
||||
export PATH=$PWD/bin:$PATH
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"language": "zig",
|
||||
"version": "0.7.1",
|
||||
"aliases": ["zig"],
|
||||
"author": "Dan Vargas <danvargas46@gmail.com>"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
shift # Filename is only used in compile step, so we can take it out here
|
||||
./out "$@"
|
|
@ -0,0 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
const stdout = std.io.getStdOut().writer();
|
||||
try stdout.print("OK\n", .{});
|
||||
}
|
Loading…
Reference in New Issue