diff --git a/.github/workflows/build-core.yml b/.github/workflows/build-core.yml
index 744a23e..5dbc26b 100644
--- a/.github/workflows/build-core.yml
+++ b/.github/workflows/build-core.yml
@@ -36,17 +36,41 @@ jobs:
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --no-build --configuration Release
+
+ native-aot:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ dotnet-version: [8, 10]
+ defaults:
+ run:
+ working-directory: ./src/FastIDs.TypeId
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: ${{ matrix.dotnet-version }}
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Native AOT publish
+ env:
+ TARGET_FRAMEWORK: "net${{ matrix.dotnet-version }}.0"
+ run: |
+ set -euo pipefail
+ dotnet publish ./TypeId.Core/TypeId.Core.csproj -c Release -r linux-x64 -f $TARGET_FRAMEWORK /p:PublishAot=true -o ./native-artifacts
+ ls -la ./native-artifacts
pack-and-push:
runs-on: ubuntu-latest
- needs: build
+ needs: [build, native-aot]
if: startsWith(github.ref, 'refs/tags/')
defaults:
run:
working-directory: ./src/FastIDs.TypeId
steps:
- uses: actions/checkout@v3
- - name: Setup .NET 10 (for packing)
+ - name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10
diff --git a/README.md b/README.md
index efb2731..558477f 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://www.nuget.org/packages/FastIDs.TypeId)
-High-performance C# implementation of [TypeId](https://github.com/jetpack-io/typeid/).
+High-performance, Native AOT-compatible C# implementation of [TypeId](https://github.com/jetpack-io/typeid/).
Here's an example of a TypeID of type user:
```
diff --git a/src/FastIDs.TypeId.Serialization/TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj b/src/FastIDs.TypeId.Serialization/TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj
index eac44d9..1f93e84 100644
--- a/src/FastIDs.TypeId.Serialization/TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj
+++ b/src/FastIDs.TypeId.Serialization/TypeId.Serialization.SystemTextJson/TypeId.Serialization.SystemTextJson.csproj
@@ -19,6 +19,12 @@
Copyright (c) Mykhailo Matviiv 2023.
+
+ true
+ true
+ true
+
+
diff --git a/src/FastIDs.TypeId/TypeId.Core/TypeId.Core.csproj b/src/FastIDs.TypeId/TypeId.Core/TypeId.Core.csproj
index 8835d48..77dcb06 100644
--- a/src/FastIDs.TypeId/TypeId.Core/TypeId.Core.csproj
+++ b/src/FastIDs.TypeId/TypeId.Core/TypeId.Core.csproj
@@ -28,6 +28,12 @@
All
true
+
+
+ true
+ true
+ true
+