Show HN: ApplePy – Embed and Call Swift from Python (Like PyO3, but for Swift)(github.com)
github.com
Show HN: ApplePy – Embed and Call Swift from Python (Like PyO3, but for Swift)
https://github.com/jagtesh/ApplePy
3 コメント
Could you apply this to speed up cherrypy?
Why Swift as a native extension language? A few things people underestimate:
- Swift doesn't have a garbage collector. Like Rust, it uses automatic reference counting (implicit by default) with copy-on-write semantics for safe concurrency you get most of Rust's memory safety guarantees with a much lighter syntax.
- Performance lands around 80% of Rust out of the box, with compiler hints available to close the gap further if you need to tune hot paths.
- Swift 6.3 ships native C++ interop, and the same codebase compiles to iOS, Android, Windows, Linux, and macOS.
For Python developers who want native-speed extensions without writing C or wrestling with Rust's learning curve, Swift is a genuinely underappreciated option. ApplePy tries to make that path practical.
The project is early - feedback and contributions very welcome.