Skip to content

chore: download pact_ffi from the dist-built release - #26

Merged
YOU54F merged 1 commit into
mainfrom
chore/pact-ffi-dist-release
Oct 23, 2026
Merged

YOU54F merged 1 commit into
mainfrom
chore/pact-ffi-dist-release

Conversation

@JP-Ellis

Copy link
Copy Markdown
Member

Goal

pact-reference now builds pact_ffi with cargo-dist. From 0.5.12, each release is tagged pact_ffi-v<version> and carries one archive per Rust target triple. The legacy libpact_ffi-v<version> release, with the single-file .gz names this gem downloads, stops on 2027-06-30.

Changes

  • script/lib/platforms.rb maps each native lib directory to its target triple.
  • script/download_libs.rb:
    • downloads pact_ffi-<target>.tar.xz (.zip for Windows) and its .sha256;
    • verifies the digest;
    • extracts only the shared library into the same ffi/<dir>/<lib> path;
    • takes the headers from the new release.
  • script/release.rb selects the newest pact_ffi-v release.
  • Gem version 0.5.8.1 → 0.5.12.0. The archive layout exists from pact_ffi 0.5.12, and the {ffi}.{N} scheme ties the gem version to it.
  • DEVELOPING.md names the new tag.

Testing

On macOS arm64:

  • ruby script/download_libs.rb and --all against 0.5.12: every checksum verified, and all 7 libraries extracted.
  • make test: 6 examples, 0 failures.
  • The release.rb selection returns pact_ffi-v0.5.12.

Not run: loading the Linux and Windows libraries, and the multi-platform gem build.

pact-reference publishes pact_ffi through cargo-dist from 0.5.12 as
`pact_ffi-v<version>`, with one `pact_ffi-<target>.{tar.xz,zip}` archive
per Rust target triple. The legacy `libpact_ffi-v<version>` release with
single-file .gz assets stops on 2027-06-30.

- platforms.rb maps each native lib directory to its target triple.
- download_libs.rb fetches the archive and its .sha256, verifies the
  digest, and extracts only the shared library (tar for tar.xz, unzip
  for the Windows zip) into the same ffi/<dir>/<lib> path. Headers come
  from the new release.
- release.rb selects the newest `pact_ffi-v` release.
- version.rb moves from 0.5.8.1 to 0.5.12.0, because the archive layout
  exists from pact_ffi 0.5.12 onwards.
- DEVELOPING.md names the new tag.

Assisted-by: Claude Code:claude-opus-5-5
@JP-Ellis
JP-Ellis marked this pull request as ready for review October 20, 2026 05:49
@YOU54F

YOU54F commented Oct 23, 2026

Copy link
Copy Markdown
Member

Thanks Josh! :)

@YOU54F
YOU54F merged commit 6524792 into main Oct 23, 2026
47 checks passed
@YOU54F
YOU54F deleted the chore/pact-ffi-dist-release branch October 23, 2026 18:38
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