Skip to content

Commit afd05c5

Browse files
YOU54Fadamrodger
authored andcommitted
feat: support linux-arm64 runtime (libc)
1 parent 8f98cb5 commit afd05c5

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,18 @@ version by executing the script in Bash (or Git Bash on Windows):
5959
build/download-native-libs.sh
6060
```
6161

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

6565
```
6666
build/
6767
linux/
6868
x86_64/
6969
libpact_ffi.so
70+
aarch64/
71+
libpact_ffi.so
7072
osx/
71-
aarch64-apple-darwin/
73+
aarch64/
7274
libpact_ffi.dylib
7375
x86_64/
7476
libpact_ffi.dylib

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,16 @@ For writing messaging pacts instead of requests/response pacts, see the [messagi
232232

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

235-
| OS | Arch | Support |
236-
| ------------ | ----------- | -------------------------------------------------------------------|
237-
| Windows | x86 | ❌ No |
238-
| Windows | x64 | ✔️ Yes |
239-
| Linux (libc) | ARM | ❌ No |
240-
| Linux (libc) | x86 | ❌ No |
241-
| Linux (libc) | x64 | ✔️ Yes |
242-
| Linux (musl) | Any |[No](https://github.com/pact-foundation/pact-net/issues/374) |
243-
| OSX | x64 | ✔️ Yes |
244-
| OSX | ARM (M1/M2) | ✔️ Yes |
235+
| OS | Arch | Support |
236+
| ------------ | ------------ | -------------------------------------------------------------------|
237+
| Windows | x86 | ❌ No |
238+
| Windows | x64 | ✔️ Yes |
239+
| Linux (libc) | ARM64 | ✔️ Yes |
240+
| Linux (libc) | x64 | ✔️ Yes |
241+
| Linux (libc) | x86 | ❌ No |
242+
| Linux (musl) | Any |[No](https://github.com/pact-foundation/pact-net/issues/374) |
243+
| OSX | x64 | ✔️ Yes |
244+
| OSX | ARM64 (M1/M2)| ✔️ Yes |
245245

246246
### Pact Specification
247247

build/download-native-libs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ download_native() {
6464

6565
download_native "pact_ffi" "windows" "x86_64" "dll"
6666
download_native "libpact_ffi" "linux" "x86_64" "so"
67+
download_native "libpact_ffi" "linux" "aarch64" "so"
6768
download_native "libpact_ffi" "macos" "x86_64" "dylib"
6869
download_native "libpact_ffi" "macos" "aarch64" "dylib"
6970

src/PactNet/PactNet.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@
3333
<Link>libpact_ffi.so</Link>
3434
<PackagePath>runtimes/linux-x64/native</PackagePath>
3535
<Pack>true</Pack>
36-
<CopyToOutputDirectory Condition="'$(IsLinux)'">PreserveNewest</CopyToOutputDirectory>
36+
<CopyToOutputDirectory Condition="'$(IsLinux)' And '$(IsArm64)' == 'False'">PreserveNewest</CopyToOutputDirectory>
37+
<Visible>false</Visible>
38+
</Content>
39+
<Content Include="$(MSBuildProjectDirectory)\..\..\build\linux\aarch64\libpact_ffi.so">
40+
<Link>libpact_ffi.so</Link>
41+
<PackagePath>runtimes/linux-arm64/native</PackagePath>
42+
<Pack>true</Pack>
43+
<CopyToOutputDirectory Condition="'$(IsLinux)' And '$(IsArm64)' == 'True'">PreserveNewest</CopyToOutputDirectory>
3744
<Visible>false</Visible>
3845
</Content>
3946
<Content Include="$(MSBuildProjectDirectory)\..\..\build\macos\x86_64\libpact_ffi.dylib">

0 commit comments

Comments
 (0)