vapor / postgres-nio

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

Can you please add Musl to cross compile? #491

Open jasonjurotich opened 5 months ago

jasonjurotich commented 5 months 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 5 months 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 5 months ago

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

jasonjurotich commented 3 months ago

hello, just wanted to know if this was added yet... I had to clone this weeks ago to add it myself while waiting. Thanks!

thoven87 commented 3 months ago

hello, just wanted to know if this was added yet... I had to clone this weeks ago to add it myself while waiting. Thanks!

Why not open a Pull request with your patch? @jasonjurotich