Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure AWSLambdaRuntime only links FoundationEssentials #365

Merged

Conversation

fabianfett
Copy link
Member

Ensure AWSLambdaRuntime only links FoundationEssentials

Motivation:

  • We want to have great startup performance. Key to a quick startup is small binary size.
  • When we use JSON today, we link complete Foundation
  • FoundationEssentials was introduce to solve this issue

Modifications:

  • Drop the dependency on NIOFoundationCompat, as it links the full Foundation and can only drop this dependency with the next major.
  • Vendor necessary files from NIOFoundationCompat

Result:

  • For a small HelloWorld that uses JSON, we are now at 9.2MB zipped.

@fabianfett fabianfett added this to the 2.0 milestone Oct 8, 2024
@sebsto sebsto marked this pull request as ready for review October 8, 2024 17:51
@sebsto sebsto merged commit 6d886aa into swift-server:main Oct 8, 2024
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants