vapor / postgres-nio

🐘 Non-blocking, event-driven Swift client for PostgreSQL.
https://api.vapor.codes/postgresnio/documentation/postgresnio/
MIT License
304 stars 70 forks source link

Can you please add Musl to cross compile? #491

Open jasonjurotich opened 6 days ago

jasonjurotich commented 6 days ago

Apple is saying here that they are going to use Musl for cross compiling... can you add it please? Thanks https://www.swift.org/documentation/articles/static-linux-getting-started.html

if os(macOS) || os(iOS)

import Darwin

elseif canImport(Glibc)

import Glibc

elseif canImport(Musl)

import Musl

elseif os(Windows)

import ucrt

else

error(Unknown platform)

endif

MihaelIsaev commented 6 days ago

It seems there are only three places where we import Glibc, and only two of them need changes?

Screenshot 2024-07-02 at 02 17 49
jasonjurotich commented 6 days ago

yes, but principally here: postgres-nio/Sources/ConnectionPoolModule/PoolStateMachine.swift:4:8: error: no such module 'Glibc'