mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
25eb6e16de
We want that the runtime only depends on `FoundationEssentials` where available (ie. on linux) to ensure small binary size. ### Motivation: Smaller binary size is good for lambda deployment and cold-start times. The runtime should only depend on `FoundationEssentials`. ### Modifications: - replace `import Foundation` with `import FoundationEssentials` if `FoundationEssentials` is available. - I also applied the same treatment to tests to ensure that catch error where tests run on linux and we use API that is only available in `Foundation` which easily happens when you develop on macOS (where always full `Foundation` is available). ### Result: This should allow builds without linking full `Foundation`.