Skip to content

feat: add win-arm64 support and store native libraries in LFS - #12

Merged
rubo merged 5 commits into
mainfrom
win-arm64
Oct 8, 2026
Merged

rubo merged 5 commits into
mainfrom
win-arm64

Conversation

@rubo

@rubo rubo commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • win-arm64 native library. blst.dll is built natively on windows-11-arm with the MSVC ARM64 toolchain. build.bat therefore assembles blst's hand-written armv8 assembly, the same fast paths as linux-arm64 and osx-arm64. DllMain runs and enables runtime SHA-2 detection (IsProcessorFeaturePresent).
    • -arm64x is deliberately not used: it links with /noentry, which skips DllMain, so the SHA-2 hardware path would stay off.
    • A build step fails unless dumpbin reports ARM64. build.bat picks the assembly flavor from the cl banner, so a wrong toolchain would otherwise quietly produce an x64 DLL.
  • Native libraries in LFS (same .gitattributes rules as mcl-bindings).
  • Workflows split like mcl-bindings:
    • Build blst (new, workflow_dispatch): builds all six runtimes natively on their own architecture.
      • Linux builds run in an ubuntu:22.04 container, for an older glibc baseline.
      • macOS x64 now builds on macos-26-intel instead of cross-compiling.
      • Linux and macOS binaries are stripped.
      • Optionally opens a PR with the updated binaries.
    • Test / Publish: tests the committed binaries on ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-26-intel, windows-latest and windows-11-arm.
      • On windows-11-arm, a step asserts the .NET RID is win-arm64, so an emulated x64 runtime can't pass by silently loading the x64 DLL.
      • The generated-code/formatting check is kept.
      • Publishes on release or dispatch.
  • Binaries refreshed from the new Build blst workflow (blst 4f72b30). The previous linux-arm64 binary was a copy of linux-x64.
  • README badge fixed: it pointed at the nonexistent test.yml.
  • Microsoft.SourceLink.GitHub bumped 8.0.0 → 10.0.401. main is currently red: restore fails with NU1902 (vulnerable Microsoft.Build.Tasks.Git 8.0.0) under warnings-as-errors.

Notes

  • Removed inputs: as in mcl-bindings, Test / Publish no longer has the preview input (VersionSuffix=preview.N). The blst ref input moved to Build blst.
  • Repo setting needed: the create-pr option of Build blst requires Allow GitHub Actions to create and approve pull requests.
  • Squash merge recommended: early commits on this branch contain an x64 placeholder at the win-arm64 path and non-LFS binary blobs.

Testing

  • Build: Build blst ran green on all six runtimes (run 37852948171, via a temporary push-triggered branch, since a new workflow can't be dispatched before it is on main). file confirms each binary's OS/arch.
  • Tests: in an earlier run on this branch, all tests passed on windows-11-arm (58/58, RID win-arm64), windows-latest, ubuntu-latest and macos-latest. Test / Publish on this PR covers all six runtimes.
  • Packaging: a local dotnet pack includes runtimes/win-arm64/native/blst.dll.

🤖 Generated with Claude Code

rubo and others added 5 commits October 9, 2026 00:02
Build blst.dll natively on windows-11-arm with the MSVC ARM64 toolchain so
build.bat assembles the armv8 assembly, and run the tests on that runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the native library builds to a dispatchable Build blst workflow that
builds natively per architecture and optionally opens a PR with updated
binaries. Test / Publish now tests the committed binaries on all six
runtimes and publishes on release or dispatch. Fix the README badge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rubo
rubo requested a review from Marchhill as a code owner October 8, 2026 22:23
@rubo rubo changed the title Add win-arm64 support; store native libraries in LFS feat: add win-arm64 support and store native libraries in LFS Oct 8, 2026
@rubo
rubo merged commit 475fefc into main Oct 8, 2026
8 checks passed
@rubo
rubo deleted the win-arm64 branch October 8, 2026 22:28
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.

1 participant