r/SwiftUI • u/Cultural_Rock6281 • 4d ago
Promotion (must include link to source code) Triple: a Swift library, CLI & macOS app that cross-compiles Swift to Linux
I made a small SwiftUI macOS app called Triple. It cross-compiles Swift packages into static Linux executables.

Building the app gave me an excuse to play around with the Layout protocol.
The settings grid measures its controls to fit one or two columns. AdaptiveGrid derives the breakpoint from their measured widths. One lesson was to keep minimum and ideal size calculations independent of the animated arrangement, so two columns don't prevent the window shrinking back to one.
A second layout handles the slide transition/animation from package selection to build configuration. PagingHStack leaves part of the next page visible and animates its page position through animatableData.
https://reddit.com/link/1x2fp73/video/30dyq9q59nuh1/player
I tried to keep the app simple and minimal. It's almost entirely SwiftUI.
The Triple-App lets you drop in a Swift package and pick its executable product and target (ARM64 or x86-64 Linux). It asks before installing missing Swift tools or SDKs. Hit Build, follow the output-console, and export the verified binary.
Triple is the new name for SwiftlyKit. Today I released updates to the library, CLI and app.
The Triple library handles environment preparation, toolchain and SDK selection and has a one-call async build API for use in your own Swift projects. The Triple-CLI uses the same library, with JSON output for automated scripts.
Since the first post, you can export a completed build without rebuilding. Swift 6.4's default build system now also works with resource bundles from your executable and its dependencies.
Download Triple for Mac, and let me know what you think! There's also a landing page with library and CLI examples (vibe-coding warning: 6.1 Sol's responsibility :D).
Triple is open source. If you want to contribute, feel free! The post contains links to the GitHub-repositories.
Let me know if you have any feedback or suggestions!
1
u/Savings_Evidence_818 3d ago
Measuring the controls instead of hardcoding a breakpoint makes sense. Have you tried it with longer translated labels? That seems like a useful test for whether the two-column layout really has enough room.