Skip to content

Instantly share code, notes, and snippets.

@0xNineteen
Last active July 25, 2023 16:15
Show Gist options
  • Save 0xNineteen/adc3a5d4253446678ec8c485d0178f38 to your computer and use it in GitHub Desktop.
Save 0xNineteen/adc3a5d4253446678ec8c485d0178f38 to your computer and use it in GitHub Desktop.
URL=$(curl https://ziglang.org/download/index.json | jq '.master."aarch64-macos".tarball')
URL=${URL//\"/}
curl $URL -O
# unwrap .tar to directory
FN=$(basename "$URL")
tar xf $FN
rm $FN
# required: ~/.profile PATH already points to this 'zig' path
# same with VSCode settings
rm -rf ./zig/
DIR=${FN%.tar.xz}
mv $DIR zig
source ~/.profile
# required: have this cloned in zls/ folder: https://github.com/zigtools/zls
# required: "zig.zls.path" is set in VSCode to this path (zls/zig-out/bin/zls)
cd zls/
git pull origin master
zig build -Doptimize=ReleaseSafe
echo ---
echo zig version :: $(zig version)
echo zls version :: $(zig-out/bin/zls --version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment