Skip to content

Conversation

@felipeasimos
Copy link

@felipeasimos felipeasimos commented Oct 16, 2025

fixed writer, callconv and add use_llvm option.

I am aware there are already some redundant PRs with version bumps and fixes for 0.15.1/0.15.2 and master, but for it to work without LLVM we depend on fixes on zig itself. This PR apply the same fixes but also expose the use_llvm option to the cli so nobody (that is willing to use LLVM) is blocked for now.

When the fixes enter the next release and one of the other PRs here is merged I will close this one to avoid cluttering the PR tab.

@AverageTurtle
Copy link

you are my hero, thank you.

@felipeasimos
Copy link
Author

The tags in the gfx-rs repo changed from v27.0.2 to v27.0.2.0, so fixing them and rehashing was necessary. Btw, I had to use this script to get the new entries (after extracting the correct links to a file). Does anybody know a better way to rehash this kind of stuff in the future? Just zig fetch --saveing the new links didn't work, even after removing the hashes from the build.zig.zon entries.

#!/usr/bin/env bash
set -euo pipefail

if [[ $# -ne 1 ]]; then
  echo "usage: $0 links.txt" >&2
  exit 1
fi

links_file="$1"

while IFS= read -r link || [[ -n "$link" ]]; do
  # Skip empty lines and comments
  [[ -z "$link" || "$link" =~ ^[[:space:]]*# ]] && continue

  # Get basename and normalize name
  base="$(basename "$link")"
  name="${base%.*}"
  name="${name%.tar}"
  name="${name%.gz}"
  name="${name%.xz}"
  name="${name%.zip}"
  name="${name//-/_}"

  # Run zig fetch and grab the final line as the hash
  hash="$(zig fetch --debug-hash "$link" | tail -n 1)"

  cat <<EOF
    .$name = .{
        .url = "$link",
        .hash = "$hash",
        .lazy = true,
    },
EOF

done < "$links_file"

@felipeasimos felipeasimos changed the title Llvm and version bump Llvm, version bump and links fixed Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants