Before Windows, @compnerd got Swift running on Android, did a PlayStation port, and laid early groundwork for embedded Swift.
In the latest episode, he shares his journey of porting Swift to Windows one patch at a time.
https://t.co/BbmvFgMS1F
Thanks to @compnerd, we have a new Swift XML parser! 🌿
Xylem is pure Swift, zero dependencies, covering SAX, DOM, and XPath 1.0. This is the kind of infrastructure work that helps Swift thrive everywhere! 🎉 https://t.co/1jojEv2TL9
@yukkuri_lab @bitsydoge @bztree@tsoding@clattner_llvm These are the common controls from windows, with the updated manifest for the latest version. I think that it’s more that it is the traditional Win32 rather than the XAML based UI like in WinUI.
@rsms@awesomekling@ladybirdbrowser You can always cross compile. The compiler builds and runs on macOS, Linux, and Windows. At @browsercompany we are working on cross compilation from Windows to other environments including Android. Building any modern C++ compiler for a new system is likely as involved IMO.
We've been evaluating a number of C++ successor languages for @ladybirdbrowser, and the one best suited to our needs appears to be @SwiftLang 🪶
Over the last few months, I've asked a bunch of folks to pick some little part of our project and try rewriting it in the different languages we were evaluating. The feedback was very clear: everyone preferred Swift!
Why do we like Swift?
First off, Swift has both memory & data race safety (as of v6). It's also a modern language with solid ergonomics.
Something that matters to us a lot is OO. Web specs & browser internals tend to be highly object-oriented, and life is easier when you can model specs closely in your code. Swift has first-class OO support, in many ways even nicer than C++.
The Swift team is also investing heavily in C++ interop, which means there's a real path to incremental adoption, not just gigantic rewrites.
Strong ties to Apple?
Swift has historically been strongly tied to Apple and their platforms, but in the last year, there's been a push for "swiftlang" to become more independent. (It's now in a separate GitHub org, no longer in "apple", for example).
Support for non-Apple platforms is also improving, as is the support for other, LSP-based development environments.
What happens next?
We aren't able to start using it just yet, as the current release of Swift ships with a version of Clang that's too old to grok our existing C++ codebase. But when Swift 6 comes out of beta this fall, we will begin using it!
No language is perfect, and there are a lot of things here that we don't know yet. I'm not aware of anyone doing browser engine stuff in Swift before, so we'll probably end up with feedback for the Swift team as well.
I'm super excited about this! We must steer Ladybird towards memory safety, and the first step is selecting a successor language that we can begin adopting very soon. 🤓🐞
@barrelshifter Yeah, the code is pretty well structured. I’m just not sure what the benefit would be, unless the purpose is to play with newer C++ constructs.
@mronge When bringing an entire ecosystem to a new environment, polishing the solution takes time. I believe that Swift's tradeoffs makes it the best choice for most applications, but business sometimes dictates a different choice.
@EricWaffles@joshm@browsercompany We would love to have more collaborators on the tools! A small sample:
WinUI Bindings @ https://t.co/EDcLFX3Mb1
Firebase Interface @ https://t.co/q8LsRIOjkb
Toolchain Builds @ https://t.co/W1blAdi0Eu
UI Testing Infrastructure @ https://t.co/cAFrjpgEsl
@EricWaffles@joshm@browsercompany We are ecstatic to share the product with everyone! We have been developing the tooling in public and have been sharing them back with the community. @browsercompany really does believe in Swift for x-plat development and would love to have others along on the journey.
🪟Arc for Windows Update🪟
🧪 ~100k beta testers onboarded
📈 ~1 million people on waitlist
📅 Opening to GA before Summer
🥇 1st major Windows app built in Swift
Shoutout to @alexandracoding and the team!
We’ve talked before about how we run Swift code on Windows, but we haven’t talked about how we write Swift code on Windows.
We're starting today!
https://t.co/rAsmTq1E0i
It wasn't that long ago when Swift on Windows felt like a risk, but now our Windows app is in the hands of 80,000 + members, and our devs are able to write Swift as productively as ever!
Today, we published a post going over the Swift ecosystem on Windows.
Link below👇