From cf0062e6bfed8a2fd66ce2a85110490b2be7d862 Mon Sep 17 00:00:00 2001 From: hmziqagent Date: Mon, 9 Nov 2026 06:06:39 +0100 Subject: [PATCH 1/2] ci(bindings): read both lipo slices from their target-triple dirs napi build --platform routes the host slice through target//release like any explicit --target build, so the universal2 lipo step looked for target/release/libllm_proxy_node.dylib and found nothing. Both slices now come from explicit triples read at deterministic paths, independent of runner architecture. --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58938c6..46ca1f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,11 +90,14 @@ jobs: working-directory: bindings/node run: | npm ci - # Generates binding.js/binding.d.ts and the host arm64 slice. - npx napi build --platform --release --js binding.js --dts binding.d.ts + # Generates binding.js/binding.d.ts plus the arm64 slice; an + # explicit --target puts each slice under target//release, + # so lipo reads two deterministic paths instead of --platform's + # host-dependent location. + npx napi build --release --target aarch64-apple-darwin --js binding.js --dts binding.d.ts cargo build --release --target x86_64-apple-darwin lipo -create -output llm-proxy.darwin-universal.node \ - target/release/libllm_proxy_node.dylib \ + target/aarch64-apple-darwin/release/libllm_proxy_node.dylib \ target/x86_64-apple-darwin/release/libllm_proxy_node.dylib node --test test/ From 0e770a353117a165ec2c619798f26eca27d81899 Mon Sep 17 00:00:00 2001 From: hmziqagent Date: Mon, 9 Nov 2026 06:24:01 +0100 Subject: [PATCH 2/2] ci(bindings): build the Node loader with the package's own build script An explicit --target napi build skips generating binding.js/binding.d.ts, so the runner's index.js found no loader to require. npm run build (plain --platform) generates them, and run 1's failure proves --platform puts the host dylib under target/aarch64-apple-darwin/release/ rather than target/release/, which is where lipo now reads it. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46ca1f9..acdda28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,11 +90,11 @@ jobs: working-directory: bindings/node run: | npm ci - # Generates binding.js/binding.d.ts plus the arm64 slice; an - # explicit --target puts each slice under target//release, - # so lipo reads two deterministic paths instead of --platform's - # host-dependent location. - npx napi build --release --target aarch64-apple-darwin --js binding.js --dts binding.d.ts + # The package's own build script generates binding.js/binding.d.ts + # and the host arm64 slice; napi build --platform passes the host + # triple to cargo, so that dylib lands under target//release + # (an explicit --target build skips generating the loader files). + npm run build cargo build --release --target x86_64-apple-darwin lipo -create -output llm-proxy.darwin-universal.node \ target/aarch64-apple-darwin/release/libllm_proxy_node.dylib \