async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

import FoundationEssentials instead of Foundation when available

Open t089 opened this issue 11 months ago • 1 comments

This PR replaces import Foundation with import FoundationEssentials when available.

Linking Foundation on Linux comes with a significant binary size increase due to the included icu data. None of this is necessary for the HTTP client. Instead we can use FoundationEssentials to get access to the essential types like URL, Data, Date, ... without including icu data.

According to @Lukasa, sadly, this might be a semver major change. :(

t089 avatar Dec 27 '24 08:12 t089

Indeed it is. See apple/swift-crypto#317 for the full discussion.

Lukasa avatar Dec 30 '24 15:12 Lukasa