Split FoundationEssentials extensions from NIOFoundationCompat (#3567)

Split FoundationEssentials extensions from NIOFoundationCompat

### Motivation:

Resolves #3038 

### Modifications:

Split NIOFoundationCompat into two and only import FoundationEssentials
and NIOFoundationEssentialsCompat where appropriate.

### Result:

ByteBuffer/Codable extensions can be used without vendoring the code or
linking to Foundation.

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
Co-authored-by: Fabian Fett <fabianfett@apple.com>
This commit is contained in:
authored and GitHub committed 2026-04-21 18:58:43 +01:00
1 parent 32e3d86379
commit 38000794f2
8 files changed
+56 -7

No files matched your search

@@ -15,8 +15,12 @@
#if canImport(Darwin) || os(Linux) || os(Android)
import _NIOFileSystem
import NIOCore
import NIOFoundationCompat
import NIOFoundationEssentialsCompat
#if canImport(FoundationEssentials)
import struct FoundationEssentials.Data
#else
import struct Foundation.Data
#endif
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
extension Data {