diff --git a/packages/zig/0.13.0/build.sh b/packages/zig/0.13.0/build.sh new file mode 100644 index 0000000..bf2a65f --- /dev/null +++ b/packages/zig/0.13.0/build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +mkdir -p bin +cd bin/ + +curl -L "https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz" -o zig.tar.xz +tar xf zig.tar.xz --strip-components=1 +rm zig.tar.xz + +cd ../ \ No newline at end of file diff --git a/packages/zig/0.13.0/compile b/packages/zig/0.13.0/compile new file mode 100644 index 0000000..75ee6ba --- /dev/null +++ b/packages/zig/0.13.0/compile @@ -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 diff --git a/packages/zig/0.13.0/environment b/packages/zig/0.13.0/environment new file mode 100644 index 0000000..a85000c --- /dev/null +++ b/packages/zig/0.13.0/environment @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# compiler path +export PATH=$PWD/bin:$PATH diff --git a/packages/zig/0.13.0/metadata.json b/packages/zig/0.13.0/metadata.json new file mode 100644 index 0000000..cb4a141 --- /dev/null +++ b/packages/zig/0.13.0/metadata.json @@ -0,0 +1,9 @@ +{ + "language": "zig", + "version": "0.13.0", + "aliases": [], + "limit_overrides": { + "compile_timeout": 15000, + "compile_cpu_time": 15000 + } +} diff --git a/packages/zig/0.13.0/run b/packages/zig/0.13.0/run new file mode 100644 index 0000000..d96e06f --- /dev/null +++ b/packages/zig/0.13.0/run @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +shift # Filename is only used in compile step, so we can take it out here +./out "$@" diff --git a/packages/zig/0.13.0/test.zig b/packages/zig/0.13.0/test.zig new file mode 100644 index 0000000..7e4bcd0 --- /dev/null +++ b/packages/zig/0.13.0/test.zig @@ -0,0 +1,5 @@ +const std = @import("std"); + +pub fn main() !void { + std.debug.print("Hello!\n", .{}); +}