3 ms·
I’ve been interested in Swift for a while, but have no MacOS devices. What’s the status of swift on Windows/Linux?
by rychco 3y ago
I’ve been interested in Swift for a while, but have no MacOS devices. What’s the status of swift on Windows/Linux?
- kitsunesoba 3y agoIt's not as good as Xcode, but you can set up a serviceable Swift dev environment on Linux with VS Code and the official Swift VS Code plugin which adds LSP and debugger support. It's easiest to set up in Ubuntu and Fedora but should be possible in in other distros. I haven't toyed with Swift under Windows, but the devs behind Arc Browser have been hiring people to work on improving Windows tooling and writing a Swift wrapper for WinUI 3.
- ii41 3y agoUnusable. People seem to be concerned about Rust's ecosystem dying, but Swift's ecosystem is essentially Apple's system built-in libs + a handful of good open source packages. You need to do everything yourself when Apple's sys libs are not accessible.
- myko 3y agoIt is frustrating that Combine and SwiftUI were not open sourced, though there are few other Apple packages I find I want to reach for on Linux
- jurip 3y agoWith this year's WWDC announcements, it seems more obvious than ever that Combine was a bridge technology that has served its purpose now that Swift concurrency is taking over, and those things are open source. Doesn't help with SwiftUI, but just open sourcing it wouldn't have helped much that much without also having platform bindings, given that it uses UIKit on iOS and AppKit on Mac.
- myko 3y agoThat's true, Combine is a dead technology. Frustrating as I prefer it in a lot of cases to Swift concurrency, but I've been an Rx fan for a decade or so.
- w10-1 3y agoAs mentioned, Swift has official distributions for Windows, ubuntu et al., and VSCode is the default solution. Most of the effort is driven by the server workgroup. Note Swift's interoperability story with C/C++ is also getting much better. The key to success is to know what libraries are supported. - subgroup: https://www.swift.org/server/ https://www.swift.org/server/ - getting started: https://www.swift.org/server/guides/ https://www.swift.org/server/guides/ - wwdc 22 video: https://developer.apple.com/videos/play/wwdc2022/110360/ https://developer.apple.com/videos/play/wwdc2022/110360/) - forums: https://forums.swift.org/c/server/43 https://forums.swift.org/c/server/43) I find Swift runs faster on a Linux guest of MacOS than on MacOS itself (but that could be my setup).
- lockhouse 3y agoIt’s been in the mainline Fedora repos for several releases now, so it’s just a dnf away if you use Fedora. Installation isn’t too difficult on most of the other mainstream Linux distros either by following the installation instructions on Swift’s website.
- patmorgan23 3y agoThere's a group called "The Browser Company of New York" building a new web browser called arc in swift and they're targeting Windows first. How were building the ARC windows all with Swift - https://youtu.be/Xa_fNuaSE_I https://youtu.be/Xa_fNuaSE_I https://github.com/thebrowsercompany https://github.com/thebrowsercompany
- tcmart14 3y agoI do have a mac, but before I get too invested in Swift, I would like to know I can take it else where. I haven't tried out Swift on my linux box yet, but from reading stuff in the repos and forums, it works. I guess it depends on what you think the value add for Swift is. Some, and there is a reasonable argument, is the value add of swift over other languages is when your on an apple device taking advantage of Apple APIs/tight integration in their ecosystem. Vapor exists for server side swift, which is where I really want to take a look at swift on linux.