Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Zig 0.10.1 #596

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/zig/0.10.1/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

mkdir -p bin
cd bin/

curl -L "https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz" -o zig.tar.xz
tar xf zig.tar.xz --strip-components=1
rm zig.tar.xz

cd ../
6 changes: 6 additions & 0 deletions packages/zig/0.10.1/compile
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions packages/zig/0.10.1/environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# compiler path
export PATH=$PWD/bin:$PATH
8 changes: 8 additions & 0 deletions packages/zig/0.10.1/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"language": "zig",
"version": "0.10.1",
"aliases": [],
"limit_overrides": {
"compile_timeout": 15000
}
}
4 changes: 4 additions & 0 deletions packages/zig/0.10.1/run
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions packages/zig/0.10.1/test.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const std = @import("std");

pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("OK\n", .{});
}