-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Use case
Historically, .NET Lambda functions have cold-start times which impact user experience, system latency, and usage costs of your serverless applications. With .NET 8, Microsoft adds support for Native AOT compilation, which speeds up performance by compiling .NET code directly to machine and operating system native code, eliminating Just-in-Time (JIT) compiling at runtime. With .NET 8 Native AOT compilation, you can improve cold-start times of your Lambda functions. To learn more about Native AOT for .NET 8, see Using Native AOT in the Dotnet GitHub repository.
Solution/User Experience
Currently Native AOT is supported in .NET 8 but only a limited number of libraries are fully compatible with native AOT in .NET 8.
Lambda Powertools is not fully compatible with native AOT because of some libraries it uses (for example System.Text.Json.Serializer) which is not supported in native AOT
Proposal
All the work for this release will happen in a separate branch aot-support
, this will allow us to publish alpha releases to Nuget. This will allow customers to get early access to the new features and optionally start applying the required changes or simply give feedback on the new items.
Quick summary
The work for AOT support will be done in multiple phases beginning on supporting Logging and Metrics and continuing to the remaining utilities. We believe these two utilities will have the most work and that is the reason we are starting from there.
Item | Issue | Status | Code change required | Notes |
---|---|---|---|---|
.NET 8 support | #542 | ✅ | ||
Create automation for .NET 8 release multiple target frameworks | #542 | ✅ | ||
Logging AOT support | #628 | ✅ | Yes | |
Logging tackle AOT warnings | #628 | ✅ | 100+ warnings | |
Metrics AOT support | #602 | ✅ | Yes | |
Metrics tackle AOT warnings | #602 | ✅ | Yes | 10+ warnings |
Tracing AOT support | #607 | ✅ | Yes | |
Tracing tackle AOT warnings | #607 | ✅ | Yes | 10+ warnings |
Idempotency AOT support | #653 | ✅ | Yes | |
Idempotency tackle AOT warnings | #653 | ✅ | Yes | 10+ warnings |
Batch AOT support | #877 | ✅ | Yes | |
Batch tackle AOT warnings | ✅ | Yes | 10+ warnings | |
Parameters AOT support | #878 | ✅ | Yes | |
Parameters tackle AOT warnings | ✅ | Yes | 10+ warnings |
Legend for Status
column:
- ✅ Completed
- 🚧 Work in Progress
- ❌ Canceled / rescheduled to future release
- 🗓Backlog
Potential challenges
Tackling AOT trim warnings will be the most time consuming tasks, for this reason if some unforeseen blocker comes up we might decide to reprioritize and exclude some issues from the milestone.
Acknowledgment
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Java, TypeScript
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status