Skip to main content

AOT Compatibility Matrix

This page documents the Native AOT compatibility status for every shipping package. Use this as a reference when planning AOT-published applications.

Summary: 139 of 173 packages are AOT-compatible. 34 packages have documented blocking dependencies.

For setup instructions and source generator usage, see the Native AOT Guide.


How to Read This Matrix

StatusMeaning
AOT-safeIsAotCompatible=true. Zero IL2xxx/IL3xxx warnings in PublishAot builds.
AnnotatedContains [RequiresUnreferencedCode] or [RequiresDynamicCode] on specific methods. Safe to use if you avoid the annotated paths.
Not compatibleIsAotCompatible=false. Has a blocking dependency that prevents AOT compilation.
N/ATooling package (analyzer, source generator) — runs at compile time, not at runtime.

Dispatch Packages

Core

PackageAOT StatusNotes
Excalibur.DispatchAOT-safeSource-generated handler resolution via PrecompiledHandlerRegistry
Excalibur.Dispatch.AbstractionsAOT-safeAll interfaces and base types are trim-safe
Excalibur.Dispatch.PatternsAOT-safe
Excalibur.Dispatch.Patterns.AzureAOT-safe
Excalibur.Dispatch.Patterns.ClaimCheck.InMemoryAOT-safe
Excalibur.Dispatch.Patterns.Hosting.JsonAOT-safe

Middleware and Pipeline

PackageAOT StatusNotes
Excalibur.Dispatch.CachingAOT-safeCachingMiddleware uses RuntimeFeature.IsDynamicCodeSupported branching
Excalibur.Dispatch.Resilience.PollyAOT-safePolly v8 is AOT-compatible
Excalibur.Dispatch.Validation.FluentValidationNot compatibleFluentValidation uses Expression.Compile()

Serialization

PackageAOT StatusNotes
Excalibur.Dispatch.Serialization.MemoryPackAOT-safeMemoryPack uses source generation
Excalibur.Dispatch.Serialization.AvroNot compatibleApache.Avro uses runtime code generation
Excalibur.Dispatch.Serialization.MessagePackNot compatibleMessagePack reflection-based resolvers
Excalibur.Dispatch.Serialization.ProtobufNot compatibleprotobuf-net uses Expression.Compile()

Transport

PackageAOT StatusNotes
Excalibur.Dispatch.Transport.AbstractionsAOT-safe
Excalibur.Dispatch.Transport.RabbitMQAOT-safeBuilder pattern, no reflection
Excalibur.Dispatch.Transport.AwsSqsAOT-safeBuilder pattern, no reflection
Excalibur.Dispatch.Transport.AzureServiceBusNot compatibleAzure SDK dependency uses reflection
Excalibur.Dispatch.Transport.GooglePubSubNot compatibleGoogle Cloud SDK dependency uses reflection
Excalibur.Dispatch.Transport.KafkaNot compatibleConfluent.Kafka SchemaRegistry uses Activator.CreateInstance
Excalibur.Dispatch.Transport.GrpcNot compatiblegRPC code generation not AOT-safe

Hosting

PackageAOT StatusNotes
Excalibur.Dispatch.Hosting.AspNetCoreAOT-safe
Excalibur.Dispatch.Hosting.AwsLambdaAOT-safe
Excalibur.Dispatch.Hosting.AzureFunctionsAOT-safe
Excalibur.Dispatch.Hosting.GoogleCloudFunctionsAOT-safe
Excalibur.Dispatch.Hosting.Serverless.AbstractionsAOT-safe

Observability

PackageAOT StatusNotes
Excalibur.Dispatch.ObservabilityAOT-safeUses System.Diagnostics (OTel-aligned)
Excalibur.Dispatch.Observability.AwsAOT-safe

Security

PackageAOT StatusNotes
Excalibur.Dispatch.SecurityAOT-safe
Excalibur.Dispatch.Security.AwsAOT-safe
Excalibur.Dispatch.Security.AzureAOT-safe

Compliance

PackageAOT StatusNotes
Excalibur.Dispatch.Compliance.AbstractionsAOT-safe
Excalibur.Dispatch.ComplianceNot compatibleUses assembly scanning for data inventory
Excalibur.Dispatch.Compliance.AwsNot compatibleAWS KMS SDK dependency
Excalibur.Dispatch.Compliance.AzureAOT-safe
Excalibur.Dispatch.Compliance.VaultAOT-safe

Audit Logging

PackageAOT StatusNotes
Excalibur.Dispatch.AuditLoggingAOT-safe
Excalibur.Dispatch.AuditLogging.AwsAOT-safe
Excalibur.Dispatch.AuditLogging.DatadogAOT-safe
Excalibur.Dispatch.AuditLogging.ElasticsearchAOT-safe
Excalibur.Dispatch.AuditLogging.GoogleCloudAOT-safe
Excalibur.Dispatch.AuditLogging.OpenSearchAOT-safe
Excalibur.Dispatch.AuditLogging.PostgresAOT-safe
Excalibur.Dispatch.AuditLogging.SentinelAOT-safe
Excalibur.Dispatch.AuditLogging.SplunkAOT-safe
Excalibur.Dispatch.AuditLogging.SqlServerAOT-safe

Claim Check

PackageAOT StatusNotes
Excalibur.Dispatch.ClaimCheck.AwsS3Not compatibleAWS S3 SDK dependency
Excalibur.Dispatch.ClaimCheck.GoogleCloudStorageNot compatibleGoogle Cloud Storage SDK dependency

Leader Election

PackageAOT StatusNotes
Excalibur.Dispatch.LeaderElection.AbstractionsAOT-safe

Testing

PackageAOT StatusNotes
Excalibur.Dispatch.TestingAOT-safe
Excalibur.Dispatch.Testing.ShouldlyAOT-safe

Tooling (compile-time only)

PackageAOT StatusNotes
Excalibur.Dispatch.SourceGeneratorsN/ARoslyn source generator (netstandard2.0)
Excalibur.Dispatch.SourceGenerators.AnalyzersN/ARoslyn analyzer (netstandard2.0)
Excalibur.Dispatch.AnalyzersN/ARoslyn analyzer (netstandard2.0)

Excalibur Packages

Domain and Data Access

PackageAOT StatusNotes
Excalibur.DomainAOT-safe
Excalibur.ApplicationAOT-safe
Excalibur.Data.AbstractionsAOT-safe
Excalibur.DataAOT-safe
Excalibur.Data.InMemoryAOT-safe
Excalibur.Data.SqlServerAOT-safeDapper is AOT-compatible
Excalibur.Data.PostgresAOT-safe
Excalibur.Data.MySqlAOT-safe
Excalibur.Data.MongoDBAOT-safe
Excalibur.Data.RedisAOT-safe
Excalibur.Data.ElasticSearchAOT-safe
Excalibur.Data.DataProcessingAOT-safe
Excalibur.Data.CosmosDbNot compatibleCosmosDB SDK uses Expression.Compile()
Excalibur.Data.DynamoDbNot compatibleDynamoDB SDK reflection-based marshalling
Excalibur.Data.FirestoreNot compatibleFirestore SDK uses reflection
Excalibur.Data.OpenSearchNot compatibleOpenSearch SDK dependency

Event Sourcing

PackageAOT StatusNotes
Excalibur.EventSourcing.AbstractionsAOT-safe
Excalibur.EventSourcingAOT-safe
Excalibur.EventSourcing.InMemoryAOT-safe
Excalibur.EventSourcing.SqlServerAOT-safe
Excalibur.EventSourcing.PostgresAOT-safe
Excalibur.EventSourcing.MongoDBAOT-safe
Excalibur.EventSourcing.RedisAOT-safe
Excalibur.EventSourcing.SqliteAOT-safe
Excalibur.EventSourcing.AwsS3AOT-safe
Excalibur.EventSourcing.AzureBlobAOT-safe
Excalibur.EventSourcing.GcsAOT-safe
Excalibur.EventSourcing.CosmosDbNot compatibleCosmosDB SDK dependency
Excalibur.EventSourcing.DynamoDbNot compatibleDynamoDB SDK dependency
Excalibur.EventSourcing.FirestoreNot compatibleFirestore SDK dependency

Outbox

PackageAOT StatusNotes
Excalibur.OutboxAOT-safe
Excalibur.Outbox.InMemoryAOT-safe
Excalibur.Outbox.SqlServerAOT-safe
Excalibur.Outbox.PostgresAOT-safe
Excalibur.Outbox.RedisAOT-safe
Excalibur.Outbox.ElasticSearchAOT-safe
Excalibur.Outbox.CosmosDbNot compatibleCosmosDB SDK dependency
Excalibur.Outbox.DynamoDbNot compatibleDynamoDB SDK dependency
Excalibur.Outbox.FirestoreNot compatibleFirestore SDK dependency
Excalibur.Outbox.MongoDBNot compatibleMongoDB driver dependency

Inbox

PackageAOT StatusNotes
Excalibur.InboxAOT-safe
Excalibur.Inbox.InMemoryAOT-safe
Excalibur.Inbox.SqlServerAOT-safe
Excalibur.Inbox.PostgresAOT-safe
Excalibur.Inbox.RedisAOT-safe
Excalibur.Inbox.ElasticSearchAOT-safe
Excalibur.Inbox.MongoDBAOT-safe
Excalibur.Inbox.DynamoDbAOT-safe
Excalibur.Inbox.FirestoreAOT-safe
Excalibur.Inbox.CosmosDbNot compatibleCosmosDB SDK dependency

Saga

PackageAOT StatusNotes
Excalibur.SagaNot compatibleUses MakeGenericType for saga resolution
Excalibur.Saga.SqlServerAOT-safe
Excalibur.Saga.PostgresAOT-safe
Excalibur.Saga.MongoDBAOT-safe
Excalibur.Saga.DynamoDbAOT-safe
Excalibur.Saga.FirestoreAOT-safe
Excalibur.Saga.CosmosDbNot compatibleCosmosDB SDK dependency

CDC (Change Data Capture)

PackageAOT StatusNotes
Excalibur.CdcAOT-safe
Excalibur.Cdc.SqlServerAOT-safe
Excalibur.Cdc.PostgresAOT-safe
Excalibur.Cdc.MongoDBAOT-safe
Excalibur.Cdc.DynamoDbAOT-safe
Excalibur.Cdc.FirestoreAOT-safe
Excalibur.Cdc.CosmosDbNot compatibleCosmosDB SDK dependency

Leader Election

PackageAOT StatusNotes
Excalibur.LeaderElectionAOT-safe
Excalibur.LeaderElection.InMemoryAOT-safe
Excalibur.LeaderElection.SqlServerAOT-safe
Excalibur.LeaderElection.PostgresAOT-safe
Excalibur.LeaderElection.RedisAOT-safe
Excalibur.LeaderElection.MongoDBAOT-safe
Excalibur.LeaderElection.ConsulNot compatibleConsul SDK dependency
Excalibur.LeaderElection.KubernetesNot compatibleKubernetes SDK dependency

Hosting

PackageAOT StatusNotes
Excalibur.HostingAOT-safe
Excalibur.Hosting.WebAOT-safe
Excalibur.Hosting.AwsAOT-safe
Excalibur.Hosting.AwsLambdaAOT-safe
Excalibur.Hosting.AzureFunctionsAOT-safe
Excalibur.Hosting.GoogleCloudFunctionsAOT-safe
Excalibur.Hosting.ServerlessAOT-safe
Excalibur.Hosting.HealthChecksAOT-safe
Excalibur.Hosting.JobsAOT-safe
Excalibur.Hosting.ObservabilityAOT-safe
Excalibur.Hosting.Logging.SerilogAOT-safe

A3 (Authentication, Authorization, Audit)

PackageAOT StatusNotes
Excalibur.A3AOT-safe
Excalibur.A3.AbstractionsAOT-safe
Excalibur.A3.CoreAOT-safe
Excalibur.A3.GovernanceAOT-safe
Excalibur.A3.Governance.AbstractionsAOT-safe
Excalibur.A3.Policy.CedarAOT-safe
Excalibur.A3.Policy.OpaAOT-safe

Security and Compliance

PackageAOT StatusNotes
Excalibur.Security.AbstractionsAOT-safe
Excalibur.SecurityNot compatibleUses assembly scanning
Excalibur.Compliance.SqlServerAOT-safe
Excalibur.Compliance.PostgresAOT-safe
Excalibur.CachingNot compatibleHybridCache uses reflection

Jobs

PackageAOT StatusNotes
Excalibur.JobsAOT-safe
Excalibur.Jobs.AbstractionsAOT-safe
Excalibur.Jobs.AwsAOT-safe
Excalibur.Jobs.AzureAOT-safe
Excalibur.Jobs.CdcAOT-safe
Excalibur.Jobs.DataProcessingAOT-safe
Excalibur.Jobs.GoogleCloudAOT-safe
Excalibur.Jobs.RedisAOT-safe
Excalibur.Jobs.SqlServerAOT-safe

Testing

PackageAOT StatusNotes
Excalibur.TestingAOT-safe
Excalibur.Testing.ConformanceAOT-safe

Tools

PackageAOT StatusNotes
Excalibur.Migrate.ToolAOT-safe

Metapackages

PackageAOT StatusNotes
Excalibur.Dispatch.RabbitMQAOT-safe
Excalibur.Dispatch.AwsAOT-safe
Excalibur.Dispatch.AzureAOT-safe
Excalibur.Dispatch.KafkaAOT-safeInherits Kafka annotation warnings
Excalibur.Dispatch.PostgresAOT-safe
Excalibur.Dispatch.SqlServerAOT-safe
Excalibur.PostgresAOT-safe
Excalibur.SqlServerAOT-safe

Blocking Dependencies

These third-party dependencies prevent AOT compatibility in the affected packages:

DependencyBlocking ReasonAffected Packages
Azure CosmosDB SDKExpression.Compile() in LINQ providerCosmosDb data, event sourcing, outbox, inbox, saga, CDC
AWS DynamoDB SDKReflection-based marshallingDynamoDb data, event sourcing, outbox
Google Firestore SDKReflection-based serializationFirestore data, event sourcing, outbox
Confluent.KafkaActivator.CreateInstance for schema strategiesKafka transport
FluentValidationExpression.Compile() for validatorsFluentValidation middleware
Apache.AvroRuntime code generationAvro serialization
MessagePack-CSharpReflection-based resolversMessagePack serialization
protobuf-netExpression.Compile()Protobuf serialization
OpenSearch SDKReflection-based serializationOpenSearch data
Consul SDKReflection-based HTTP clientConsul leader election
Kubernetes SDKReflection-based clientKubernetes leader election

When these dependencies release AOT-compatible versions, the affected packages will be updated.


Consumer Checklist

To publish an AOT application with Excalibur:

  1. Verify all referenced packages are AOT-safe using the matrix above
  2. Add source generators to your project:
    <PackageReference Include="Excalibur.Dispatch.SourceGenerators" />
    <PackageReference Include="Excalibur.Dispatch.SourceGenerators.Analyzers" />
  3. Create a JsonSerializerContext for your application types (see Native AOT Guide)
  4. Mark handlers with [AutoRegister] for compile-time DI registration
  5. Publish with AOT:
    dotnet publish -c Release
  6. Check for warnings: Zero IL2xxx/IL3xxx warnings means you are fully AOT-safe

If you must use an AOT-incompatible package, the [RequiresUnreferencedCode] and [RequiresDynamicCode] attributes on your entry points will propagate warnings to callers, enabling informed decisions.