Skip to content

feat: support linux-arm64 runtime (libc) #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ version by executing the script in Bash (or Git Bash on Windows):
build/download-native-libs.sh
```

Alternatively you can download a particular FFI version from the [pact-referece] releases or build your own version
Alternatively you can download a particular FFI version from the [pact-reference] releases or build your own version
locally, and then copy the artifacts into the folders:

```
build/
linux/
x86_64/
libpact_ffi.so
aarch64/
libpact_ffi.so
osx/
aarch64-apple-darwin/
aarch64/
libpact_ffi.dylib
x86_64/
libpact_ffi.dylib
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,16 @@ For writing messaging pacts instead of requests/response pacts, see the [messagi

Due to using a shared native library instead of C# for the main Pact logic only certain OSs are supported:

| OS | Arch | Support |
| ------------ | ----------- | -------------------------------------------------------------------|
| Windows | x86 | ❌ No |
| Windows | x64 | ✔️ Yes |
| Linux (libc) | ARM | ❌ No |
| Linux (libc) | x86 | ❌ No |
| Linux (libc) | x64 | ✔️ Yes |
| Linux (musl) | Any | ❌ [No](https://github.com/pact-foundation/pact-net/issues/374) |
| OSX | x64 | ✔️ Yes |
| OSX | ARM (M1/M2) | ✔️ Yes |
| OS | Arch | Support |
| ------------ | ------------ | -------------------------------------------------------------------|
| Windows | x86 | ❌ No |
| Windows | x64 | ✔️ Yes |
| Linux (libc) | ARM64 | ✔️ Yes |
| Linux (libc) | x64 | ✔️ Yes |
| Linux (libc) | x86 | ❌ No |
| Linux (musl) | Any | ❌ [No](https://github.com/pact-foundation/pact-net/issues/374) |
| OSX | x64 | ✔️ Yes |
| OSX | ARM64 (M1/M2)| ✔️ Yes |

### Pact Specification

Expand Down
1 change: 1 addition & 0 deletions build/download-native-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ download_native() {

download_native "pact_ffi" "windows" "x86_64" "dll"
download_native "libpact_ffi" "linux" "x86_64" "so"
download_native "libpact_ffi" "linux" "aarch64" "so"
download_native "libpact_ffi" "macos" "x86_64" "dylib"
download_native "libpact_ffi" "macos" "aarch64" "dylib"

Expand Down
9 changes: 8 additions & 1 deletion src/PactNet/PactNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
<Link>libpact_ffi.so</Link>
<PackagePath>runtimes/linux-x64/native</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory Condition="'$(IsLinux)'">PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory Condition="'$(IsLinux)' And '$(IsArm64)' == 'False'">PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="$(MSBuildProjectDirectory)\..\..\build\linux\aarch64\libpact_ffi.so">
<Link>libpact_ffi.so</Link>
<PackagePath>runtimes/linux-arm64/native</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory Condition="'$(IsLinux)' And '$(IsArm64)' == 'True'">PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="$(MSBuildProjectDirectory)\..\..\build\macos\x86_64\libpact_ffi.dylib">
Expand Down