Rakefile: derive the libhegel version from the gem
The hegeltest binding targets a specific engine ABI, so its
LIBHEGEL_VERSION constant is the source of truth; updating the gem
now retargets the download task with no hand-synced constant here.

Assisted-by: GLM-5.3 via pi
change nnpqkqpoutnqtmkwuulpowpxpmonpnkq
commit 93e7888b22e90bb80e3708cdb1c33ccfd5ce4d0f
author Alpha Chen <alpha@kejadlen.dev>
date
parent uymmqllm
diff --git a/Rakefile b/Rakefile
index f7778f6..44018b1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -6,6 +6,7 @@ require "digest"
 require "net/http"
 require "rbconfig"
 require "fileutils"
+require "hegel/libhegel_version"
 
 require "minitest/test_task"
 
@@ -13,12 +14,14 @@ Minitest::TestTask.create
 
 # The hegeltest gem drives a native libhegel engine that ships separately
 # (the gem is pre-release and bundles no binary yet). This task stages it
-# for the host platform, mirroring hegel-ruby's own libhegel:fetch: pinned
-# release asset from hegeldev/hegel-rust, verified against its published
-# SHA-256, installed under tmp/libhegel/<version>/ (gitignored). The
-# directory form of HEGEL_LIBHEGEL_PATH in .envrc resolves whichever
-# platform's asset landed there.
-LIBHEGEL_VERSION = "0.32.5"
+# for the host platform, mirroring hegel-ruby's own libhegel:fetch: the
+# release asset matching the gem's engine version, verified against its
+# published SHA-256, installed under tmp/libhegel/<version>/ (gitignored).
+# The version comes from the gem — the binding targets a specific engine
+# ABI, so the gem is the source of truth, not this file. The directory form
+# of HEGEL_LIBHEGEL_PATH in .envrc resolves whichever platform's asset
+# landed there.
+LIBHEGEL_VERSION = Hegel::LIBHEGEL_VERSION
 LIBHEGEL_ASSETS = {
   "arm64-darwin" => "libhegel-darwin-arm64.dylib",
   "aarch64-linux" => "libhegel-linux-arm64.so",