Add Native AOT support for .NET 8+#394
Conversation
|
@rajanadar If you get a chance to take a look! Would be great to expand with support across the dotnet ecosystem. We have some apps using Vaultsharp which we'd love to publish as AOT instead |
|
@rajanadar Gentle ping on this :) |
|
+1 on AOT support. Importing a library that doesn't support AOT prevents the entire application from being able to enable AOT. |
|
@bbartels Can I take your code and hard fork a new project? The name for VaultSharp will be changed to something else though |
|
Feel free :) |
|
@ezhevita @rajanadar @SergeyFilippov @hoerup Would be great to get a review :) It's not that AOT is necessary for VaultSharp itself, its more than any libraries that take a dependency on VaultSharp are blocked from proper AOT support. (This is our case for some internal libraries) |
- Fix enum JsonConverter attributes to use generic JsonStringEnumConverter<T> under NET8_0_OR_GREATER for AOT safety (IssuerFormat, IssuerPrivateKeyFormat, PrivateKeyType, PrivateKeyRoleType), with non-generic fallback for older TFMs - Rename IssuerPrivetKeyFormat.cs -> IssuerPrivateKeyFormat.cs (typo fix) - Add JsonSerializable registrations in VaultSharpJsonContext for all new PKI Issuers/Keys/Roles request and response types; use TypeInfoPropertyName to disambiguate KeysData and KeyInfo which exist in both Issuers and Keys namespaces
Extend Native AOT support for PKI management APIs
|
@bbartels unfortunately i can't help you with getting approval, but majority of changes align perfectly with resolving limitation/requirement of AOT compilation and operation (as per PR description). One single question I have is about |
Fair point, removed those lines, thanks for the review! |
Summary