Skip to content

3.0.0-rc1

Pre-release
Pre-release

Choose a tag to compare

@sebsto sebsto released this 09 Jul 09:43
c824043

This is the first release candidate for 3.0.0. It builds on the 2.x runtime with a few breaking changes, so please read the migration notes before upgrading.

Breaking changes

nonisolated(nonsending) by default

The runtime now adopts nonisolated(nonsending) as the default execution semantics (Swift's NonisolatedNonsendingByDefault upcoming feature). This keeps handler code running on the caller's executor instead of hopping to the generic concurrent executor.

This is a source-breaking change for some projects. If your package does not enable the same feature, you may see conformance or "sending risks data races" errors when implementing handlers or passing closures to the runtime. You have two options:

  • Enable NonisolatedNonsendingByDefault in your own target (recommended for most projects).
  • Apply nonisolated(nonsending) explicitly on your handler, adapter, and closure signatures. See the Streaming+Codable example for a working reference.

New plugin suite

The single archive plugin is replaced by a set of focused plugins that cover the full lifecycle:

  • lambda-init: scaffolds a new Lambda function in the current project directory.
  • lambda-build: compiles and archives the Lambda binary, ready to upload to AWS.
  • lambda-deploy: deploys the Lambda function to your AWS account.

For lambda-build, we addressed some common feedback. You can package as a zip or as an OCI image, which helps with large Lambda functions or when you need to bundle binaries alongside your code. You can also choose how to compile: with Docker, with Apple's container, or by cross compiling using the Swift static Linux SDK.

Removal of deprecated 2.x APIs

APIs that were deprecated during the 2.x series have been removed. If you were still calling them, the compiler pointed you at the replacements before this release. Update those call sites before upgrading.

New features

Task-local logging

The runtime binds the per-invocation logger as the task-local Logger.current for the duration of each handler call. Code anywhere in the handler's call tree can read Logger.current and inherit the request's metadata (request ID, trace ID) without threading a LambdaContext or Logger through every function. Inside the handler, context.logger and Logger.current are equivalent.

Documentation

The documentation has been significantly reworked. The README is now minimal and points you to the right place, and most of the content has moved into Swift DocC where it is easier to browse and keep up to date. The rendered documentation will appear on the Swift Package Index within a few days, once their build backlog clears.

Feedback

This is a release candidate. Please try it against your projects and report issues before the final 3.0.0.