Saleem Abdulrasool

697 posts

Saleem Abdulrasool

Saleem Abdulrasool

@compnerd

PL/Compiler Engineer, xplat Swift, & Swift Core Team Member @ @browsercompany (ex @GoogleAI, @facebook, @Microsoft)

Sumali Mart 2009
54 Sinusundan1.8K Mga Tagasunod
Memacs Merlang
Memacs Merlang@memacsmerlang·
Didn't know you can do this in Swift 😮 F*cking beautiful and simple. No stupid prefixes in C interop. Thanks to @tsoding for discovering that (and probably to @clattner_llvm for designing that feature).
Memacs Merlang tweet media
English
2
0
82
6.4K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@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.
English
0
0
2
135
Rasmus Andersson
Rasmus Andersson@rsms·
Isn’t it going to make it harder to build ladybird on new systems? AFAIK the Swift compiler toolchain is massive. We looked at Swift for Playbit maybe two years ago and I couldn’t figure out how to get hello world working as all i was able to find was a toolchain for Ubuntu-like systems (ie with expectations on specific shared libraries available on the system.) A simple test would be to compile hello world on Android — there’s no glibc or Ubuntu-compatible dynamic loader, so would be a good proxy for “is swift portable?” Or FreeBSD
English
2
0
12
3K
Andreas Kling
Andreas Kling@awesomekling·
There have been some claims that we're now going to "disappear for years to rewrite all of @ladybirdbrowser in Swift".. Of course, we don't have time for that. We're trying to build something real and get an alpha version ready in 2026! However, we do see tremendous value in the safety and concurrency properties of Swift 6.0, so we will be adopting it incrementally in our codebase, with a focus on security-sensitive areas first, such as parsing, networking, etc. Our bet is that this will be possible thanks to the investment into C++ interop that the Swift team has made and continues to make.
English
13
8
264
33.2K
Saleem Abdulrasool nag-retweet
Andreas Kling
Andreas Kling@awesomekling·
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. 🤓🐞
English
112
153
1.7K
224.7K
jon
jon@jon_roelofs·
@barrelshifter someone should modernize the compiler-dt builtins
English
3
0
2
88
Jessica Paquette
Jessica Paquette@barrelshifter·
modernizing libunwind code looks like it would be a satisfying project
English
2
0
20
2.2K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@barrelshifter Ugh, that seems wrong. CMake should be able to test and identify the signature of the function to get that correct.
English
1
0
0
60
Jessica Paquette
Jessica Paquette@barrelshifter·
@compnerd the only thing that I’m personally irked by lately is OS preprocessor defines because recently I ran into a problem where someone used __GLIBC__ or __GNU__ or something to conditionally pick a function signature for some C stdlib function
English
2
0
0
277
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@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.
English
1
0
0
81
Jessica Paquette
Jessica Paquette@barrelshifter·
@compnerd the code is clean enough that it’d be probably be a good place to play with newer c++ stuff without having to do a real full rewrite
English
1
0
0
219
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@barrelshifter So, by modernizing do you mean just taking advantage of some of the newer C++ features like constexpr?
English
1
0
0
86
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@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.
English
0
0
8
190
Matt Ronge
Matt Ronge@mronge·
Amazing they were able to use Swift for this. We looked into Swift for our apps on Windows but ended up using Rust instead. Three years ago Swift on other platforms was still too immature.
Josh Miller@joshm

More proud today than any in @browsercompany history Not bc Arc is now on Windows (yay!), but bc of HOW this team pulled it off 🥇 Arc is the 1st Windows app built in Swift 💪 We share 80% of code btwn Mac & Windows 🫂 Built alongside 150k testers <3 THE BIG BET PAID OFF!!!

English
2
0
19
2.6K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@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.
English
1
2
15
800
Josh Miller
Josh Miller@joshm·
More proud today than any in @browsercompany history Not bc Arc is now on Windows (yay!), but bc of HOW this team pulled it off 🥇 Arc is the 1st Windows app built in Swift 💪 We share 80% of code btwn Mac & Windows 🫂 Built alongside 150k testers <3 THE BIG BET PAID OFF!!!
English
49
101
1.9K
119.4K
Saleem Abdulrasool nag-retweet
Josh Miller
Josh Miller@joshm·
🪟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!
Josh Miller tweet media
English
38
31
875
62.8K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
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👇
Saleem Abdulrasool tweet media
English
3
12
87
19.5K
Saleem Abdulrasool nag-retweet
Arc
Arc@arcinternet·
👯 Windows Buddy Day is back by popular demand! for today, mac and windows members can fast-track their buddies onto Arc for Windows Beta drop their emails in the form below and we'll do the rest 💌
English
66
28
524
76.2K
Saleem Abdulrasool nag-retweet
Alfian Losari
Alfian Losari@alfianlosari·
Experimenting with the @browsercompany swift-winrt language projection to create a Swift WinRT & WinUI 3 Windows News App! It’s so amazing, build native Windows UI using pure Swift and share business logic across platforms such as macOS, iOS, & Linux. #iosdev
English
6
11
71
7.6K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@nicojrme @joshm I'm sure that @alexandracoding has fresher data than I do, but I'd say 80% or so. The business logic is shared, the UI code is platform specific, which also helps ensure the application feels native to the platform.
English
0
1
15
4.5K
Nico Jér
Nico Jér@nicojrme·
@joshm How much % code does windows app share with mac app?
English
2
0
9
6K
Josh Miller
Josh Miller@joshm·
‼️ 𝐀𝐫𝐜 𝐟𝐨𝐫 𝐖𝐈𝐍𝐃𝐎𝐖𝐒 𝐢𝐬 ~𝐚𝐥𝐢𝐯𝐞~ ‼️ (very WIP UI but this screenshot is a real live app) more news soon... we'll send out the first invites before the end of the year, and really ramp early next!
Josh Miller tweet media
English
124
131
2.2K
224.1K
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@s1ddok @SwiftLang @JoannisOrlandos At @browsercompany, the difficult issues have been around C++ Interop, Concurrency, and build. Those fixes have been flowing back upstream. One challenge would be testing/tracking release branches (e.g. 5.10) rather than just tracking main, and small projects are great for that!
English
0
2
8
419
Saleem Abdulrasool
Saleem Abdulrasool@compnerd·
@s1ddok @SwiftLang @JoannisOrlandos It does feel that things are stabilizing. Projects are likely to not run into issues unless they are experimenting with the very latest features, and even then, it is often possible to workaround them.
English
1
0
5
147
Swift Language
Swift Language@SwiftLang·
C and C++ interoperability is one of Swift's superpowers, enabling access to a wide variety of existing APIs, including the Windows SDK. @compnerd has an excellent piece detailing the process. swift.org/blog/swift-eve…
English
4
45
264
41.6K