apple / swift-foundation

The Foundation project
Apache License 2.0
2.35k stars 150 forks source link

Android compatible? #359

Open alessdiimperio opened 8 months ago

alessdiimperio commented 8 months ago

If the Swift-stdlib can run on android and swift foundation is being built purely in swift, does this mean that swift-foundation will also run on android devices?

Would be amazing to have a KMP equivalent using Swift

iCharlesHu commented 8 months ago

Hi @alessdiimperio yes! Our plan is to make SwiftFoundation run everywhere that Swift runs. We certainly welcome contributions in that effort. Feel free to create PRs or file issues for specific problems you are seeing.

finagolfin commented 8 months ago

Would be amazing to have a KMP equivalent using Swift

I don't know what KMP is, but people are already running the current swift-corelibs-foundation on Android. Try building Swift packages with that SDK, and let me know there if you have any problems.

alessdiimperio commented 8 months ago

KMP = kotlin multiplatform and allows developers to share code between android and ios apps using kotlin code.

https://kotlinlang.org/docs/multiplatform.html#sample-projects

Is there any good source of documentation for running swift code on android and how to use platform specific api's easily? As well as interaction between swift and compose.

finagolfin commented 8 months ago

Is there any good source of documentation for running swift code on android and how to use platform specific api's easily?

No, not that I know of. Android is still a community-supported platform, so the pieces exist in various places, but you still have to put them together yourself.