News for hackers. Stuff that matters.
Re:Swift is a more convenient Rust by ethin on Saturday January 31, 2026 @07:14PM (#46842279)
My problem with it is that I want to use C libraries. And I would (like) it to handle that as much as possible. But SPM can't use vcpkg packages or call CMake stuff (at least, not trivially), so it's extremely hard to use on non-Apple platforms. Which honestly is it's killer for me. It's still so, so Apple focused.
Re:Swift is a more convenient Rust by willtemperley on Saturday January 31, 2026 @07:30PM (#46842405)
You can build Swift entirely with CMake;

https://github.com/swiftlang/swift-cmake-examples

Re:Swift is a more convenient Rust by ethin on Saturday January 31, 2026 @09:31PM (#46843063)
Sure, but I've never found examples of (say) including other swift packages. Or using CMake-built swift packages in SPM.
Re:Swift is a more convenient Rust by jabwd on Saturday January 31, 2026 @11:14PM (#46843547)
What is a CMake-built swift package to begin with? You're mixing build systems and expecting them to co-exist or what is the exact problem? I've done a lot of weird swift things so might be able to point you in the right direction.
Re:Swift is a more convenient Rust by ethin on Saturday January 31, 2026 @11:53PM (#46843722)
E.g.: referencing a vcpkg-built package (without pkgconfig because not all packages have those files). Or telling SPM "Hey, I have this package which uses the cmake build system, and I want you to link to it and auto-generate module maps for it, and get the include directories from cmake". Things like that. So for me anyway it makes using swift painful. The same thing goes in reverse: using SPM packages from cmake (although this is more a cmake issue).
Re:Swift is a more convenient Rust by wahnfrieden on Sunday February 01, 2026 @01:13AM (#46844046)
I think cmake very recently got added to spm