Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Foundation #54

Closed
t089 opened this issue Dec 26, 2024 · 7 comments
Closed

Remove Foundation #54

t089 opened this issue Dec 26, 2024 · 7 comments
Assignees

Comments

@t089
Copy link

t089 commented Dec 26, 2024

Or replace with FoundationEssentials to avoid unnecessary large binary size on Linux.

@dimitribouniol
Copy link
Member

So I made the change here, but unfortunately none of the dependencies this relies on (swift-crypto, swift-no, async-http-client…) do the same, so not sure it'll make much of a difference 😔

@t089
Copy link
Author

t089 commented Dec 26, 2024

We will get there 😀 thanks for tackling this!

@t089
Copy link
Author

t089 commented Dec 26, 2024

Regarding swift-nio. I would suggest to ditch NIOFoundationCompat and pull in the 1,2 methods you need directly to here and make them only import FoundationEssentials. Unfortunately, NIOFoundationCompat depends on API that is not available in FoundationEssentails :(

@dimitribouniol
Copy link
Member

Mind you, I'm not using SwiftNIO directly, so that's not really feasible. Pretty much everyone who will be using this package will also be using SwiftNIO in some form, so I don't really feel like diluting the surface this package touches will make any difference at all. Once package traits become available, I can explore a more limited "Toolbox" style of package that drops the networking aspects completely, but a) I don't know who actually needs this, and b) its not really a design goal at the moment (which is to provide a comprehensive solution for adding WebPush to an existing server app)

@t089
Copy link
Author

t089 commented Dec 26, 2024

Actually, you are not using NIOFoundationCompat, so swift-nio is not a problem at all (NIO does not depend on Foundation at all).

@dimitribouniol
Copy link
Member

Unfortunately, my main dependencies of AsyncHTTPClient and SwiftCrypto do import Foundation all over the place. Getting rid of either of them is likely to either make this package much more difficult to maintain, or much less capable. Not to mention, these are packages almost every swift-server-based linux user is already using, so not really a design goal either way.

@t089
Copy link
Author

t089 commented Dec 26, 2024

Step 1: apple/swift-crypto#317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants