stackotter's Avatar

stackotter

@stackotter.dev.bsky.social

Aussie software developer & uni student; Rock climber; Loves Swift, Rust and Svelte; Creator of SwiftCrossUI, Swift Bundler and Delta Client. https://stackotter.dev https://mastodon.social/@stackotter

138 Followers  |  168 Following  |  96 Posts  |  Joined: 25.11.2024  |  2.1756

Latest posts by stackotter.dev on Bluesky

SwiftCrossUI

This is lovely, SwiftUI for Windows and Linux:

swiftcrossui.dev

15.07.2025 00:11 β€” πŸ‘ 74    πŸ” 15    πŸ’¬ 2    πŸ“Œ 0

lasers and now this?! starting to sound like a very cool ctf hahah

28.06.2025 01:23 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Beberka’s PR: github.com/stackotter/s...
Follow up Publisher concurrency support PR: github.com/stackotter/s...

27.06.2025 23:14 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

SwiftCrossUI now supports strict concurrency, thanks to Beberka’s recent PR adding all the necessary annotations!

The main thing that held back concurrency support for so long was MainActor not working with Gtk on Linux, but I fixed that issue recently by polling the main job queue with Gtk timers.

27.06.2025 23:14 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

That's so sick 🀯

24.06.2025 14:56 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

And here's the same app without the AppKit-specific changes.

24.06.2025 14:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

Here's an example app with a variety of views, all sporting AppKit-specific changes applied with a few lines each. See next for without changes.

In terms of not-so-visible modifications, I made the Count text selectable, moved the picker to the right edge, and enabled drag&drop image replacement.

24.06.2025 14:52 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

I'm working on making it easier to make platform-specific changes to SwiftCrossUI's underlying backend views. I've taken inspiration from swiftui-introspect.

This sort of flexibility will be super useful for more advanced user interfaces.

24.06.2025 14:52 β€” πŸ‘ 10    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
Introduce dynamic text styles and various font modifiers by stackotter Β· Pull Request #186 Β· stackotter/swift-cross-ui This PR introduces dynamic text styles with a similar API to SwiftUI. It also expands the existing set of font-related view modifiers, and introduces a set of APIs for constructing new fonts from e...

PR: github.com/stackotter/s...

24.06.2025 05:19 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I usually include more screenshots, but these look basically the same on every platform just with different system fonts.

24.06.2025 05:19 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
All of SwiftCrossUI's text styles displayed consecutively in a VStack from largest to smallest on macOS

All of SwiftCrossUI's text styles displayed consecutively in a VStack from largest to smallest on macOS

All of SwiftCrossUI's text styles displayed consecutively in a VStack from largest to smallest on iOS

All of SwiftCrossUI's text styles displayed consecutively in a VStack from largest to smallest on iOS

SwiftCrossUI now supports dynamic text styles!

They adapt to the current 'device class'. Sizes and weights were roughly taken from Apple's typography guidelines (with some extrapolation to fill in missing text styles on certain platforms).

24.06.2025 05:19 β€” πŸ‘ 4    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

It's borderless (i.e. no background) for max flexibility. The background in this example was whacked on by me (hence the mismatch between it and the Title field on Linux). A native bordered style will be supported eventually.

23.06.2025 15:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Implement TextEditor by stackotter Β· Pull Request #187 Β· stackotter/swift-cross-ui This PR introduces a TextEditor control for editing multi-line text. For now it's borderless (i.e. has all platform-specific 'text field' looking styles disabled) to allow for it to be ...

PR: github.com/stackotter/s...

23.06.2025 15:25 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
SwiftCrossUI's notes example app running on macOS

SwiftCrossUI's notes example app running on macOS

SwiftCrossUI's notes example app running on Ubuntu

SwiftCrossUI's notes example app running on Ubuntu

SwiftCrossUI's notes example app running on iOS

SwiftCrossUI's notes example app running on iOS

SwiftCrossUI has a basic multi-line TextEditor view now!

23.06.2025 15:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Screenshot of a code snippet showing a Qt app written in Swift

Screenshot of a code snippet showing a Qt app written in Swift

I wanted to get a sence of what it means to use another UI framework in Swift for Linux and Windows. So I picked Qt6 and... hello world 😍! Swift's C++ interop is brilliant, the entire wrapper can be a target in the same Swift Package as the app itself!

#Swift #Qt6 #LinuxDev #WindowsDev

21.06.2025 11:30 β€” πŸ‘ 10    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Preview
Bringing SwiftCrossUI to Android | Buttons, Text and Stacks - stackotter on Twitch stackotter went live on Twitch. Catch up on their Software and Game Development VOD now.

The VOD is quite long so I'll probably cut it down into something more bitesize at some point, but in case anyone wants to have a skim through the recording, here's the link: www.twitch.tv/videos/24848...

13.06.2025 15:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Thank you to everyone who popped by during the stream πŸ™

SwiftCrossUI's AndroidBackend prototype now supports basic buttons, text and stacks. The example may not look like much, but we solved quite a few foundational challenges which will make future progress much faster!

13.06.2025 15:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
stackotter - Twitch Bringing SwiftCrossUI to Android

Join me on Twitch as I work on bringing SwiftCrossUI to Android! πŸ€– Live in 10 minutes

twitch.tv/stackotter

13.06.2025 11:54 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Any tips for avoiding frame drops when streaming+recording with OBS while compiling code would be greatly appreciated! I think I may have to give up on recording locally.

13.06.2025 05:21 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
stackotter - Twitch Aussie software developer & uni student; Rock climber; Loves Swift, Rust and Svelte; Creator of SwiftCrossUI, Swift Bundler and Delta Client.

Join me on Twitch tonight at 10pm AEST (2pm CET, 5am PST) as I work on bringing SwiftCrossUI to Android! πŸ€–

www.twitch.tv/stackotter

I'll be playing around with a few different approaches including giving AndroidUIKit a go.

13.06.2025 05:21 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Adding web views to SwiftCrossUI - stackotter on Twitch stackotter went live on Twitch. Catch up on their Software and Game Development VOD now.

A recording is available on Twitch: www.twitch.tv/videos/24813...

It's watchable until around 50 minutes, which is around when I get the initial AppKitBackend web view prototype working. After that the lag and desync gets pretty bad.

10.06.2025 02:44 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Implement WebView (only AppKitBackend and UIKitBackend for now) Β· stackotter/swift-cross-ui@c513e50

Commit: github.com/stackotter/s...

09.06.2025 16:55 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

Didn't manage to get it working everywhere (thank you Windows for all your strange failure modes...), but at least SwiftCrossUI has a WebView for macOS and iOS/tvOS!

09.06.2025 16:55 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Apologies for the late notice and not very global time slot.

09.06.2025 11:24 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
stackotter - Twitch Aussie software developer & uni student; Rock climber; Loves Swift, Rust and Svelte; Creator of SwiftCrossUI, Swift Bundler and Delta Client.

Join me on Twitch as I attempt to add web views to SwiftCrossUI! I've heard Apple has plans for SwiftUI, so might as well beat them to the punch!

www.twitch.tv/stackotter

I'll be explaining any SwiftCrossUI internals that we come across, and explaining my development process!

09.06.2025 11:24 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

The build commands are existential because plugins can implement their own commands, and because the array of commands may be heterogenous. Commands are implemented as structs conforming to a protocol, rather than closures, because we need a notion of equality.

07.06.2025 16:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Used them today for both equality checks on an array of existentials, and round tripping said array to and from json for equality checks across runs. I’m implementing a prototype plugin system for Swift Bundler and I need to check for equality of an array of build commands across runs for caching.

07.06.2025 16:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Implicitly Opened Existentials (SE-0352) are the gift that keeps on giving. I love them so much. Their use cases are rare (in β€˜well written’ code), but when you need them you really do need them!

07.06.2025 16:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Warpspeed: Building a Record/Replay Debugger for macOS Β· Nick Gregory Security research, programming, and more.

Warpspeed seems to be able to record and replay processes, but it doesn’t have snapshotting and probably needs lldb to support reverse stepping. Very promising project though!

Warpspeed blog post: nickgregory.me/post/2024/06...

07.06.2025 00:06 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Got reminded of time travel debugging a few days ago and now I can’t stop thinking about it. I need it on macOS!

07.06.2025 00:06 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@stackotter.dev is following 20 prominent accounts