Welcome to “What’s new in Swift,” a curated digest of releases, videos, and discussions in the Swift project and community.
Here’s an update from guest contributor Simon Leeb on Swift’s progress as a language for web scenarios:
Hi, Simon here! I am the creator of the elementary-swift project, a collection of packages born from a simple wish: I want to build web UIs in Swift and ultimately help Swift become a first-class choice for the web.
This journey began after I started using Swift for backend services. The web frontend, however, still lived in a separate ecosystem, and I really wanted it to feel as ergonomic, safe, and efficient as the Swift I was writing everywhere else.
That led to the creation of Elementary: a modern and efficient HTML rendering library with a familiar declarative API, built for the web. It integrates easily with frameworks like Vapor and Hummingbird, and has become a practical option for server-rendered web UIs.
Around that same time, years of community work in the swift-wasm project made compiling Swift to WebAssembly increasingly viable, while Embedded Swift was taking its first experimental steps. This made me wonder: “How hard can it be to use Embedded Swift and build a state-driven web UI framework that produces tiny WebAssembly binaries?” Turns out: quite hard, actually!
But it was too late. Despite my better judgment, I was in the middle of creating what is now known as ElementaryUI. Where Elementary renders HTML on the server, ElementaryUI runs in the browser itself. You can watch my talk at Swift@FOSDEM 2026 if you want to know more about the why, what, and how.
To showcase where the project is heading, I recently posted a small Full-Stack Swift on Cloudflare demo. It features Swift in the browser communicating with a Swift backend on an edge worker through shared message types. I hope it gives people a concrete sense of how much the core technologies and the surrounding tooling have advanced.
ElementaryUI is still young, with plenty left to build. Visit elementary.codes to try it, share feedback, contribute, or sponsor its development. Let’s work together and make Swift a first-class choice for the web!
Now on to other news about Swift:
Videos to watch
- Saleem Abdulrasool joined the Empower Apps podcast to discuss Swift on Windows, server-side Swift, SwiftWin32, Swift’s C++ interop, and how to get started.
- Building memory-safe software? Write security-sensitive code in Swift covers how Swift guarantees safety across bounds, lifetimes, types, initialization, and concurrency, with primitives like
Spanand non-copyable types, plus how to auditunsafecode with strict memory safety and incrementally migrate existing C modules. - Two short videos about running Embedded Swift on Raspberry Pi Pico: a video on getting started on macOS called Let it blink! and Fun with traffic lights in 60 seconds.
Community highlights
- Building scalable backend apps in Swift shares an approach to structuring server-side Swift codebases, separating business logic from database and framework details so the code stays easier to test and change over time.
- The Swift Package Index blog explains what a package registry actually is, how it fits alongside SwiftPM and package indexes, and walks through an example of switching a dependency managed from Git to a Swift registry.
- Embedded Swift Improvements Coming in Swift 6.4 rounds up what’s ahead for Swift on microcontrollers and other constrained environments.
- The Browser Company’s Swift on Windows: A year of refinement reflects on a year of work making Swift on Windows more predictable.
New package releases
- Write an interface once with SwiftTUI using a declarative, state-driven syntax, then ship it as a terminal app, as a native macOS or iOS app, as an Android app, or as a WASI build for the browser.
- Tired of hand-writing
RawRepresentableandLosslessStringConvertibleconformances? lexic generates them for you via macros, and runs the same on Linux as on Apple platforms. - StructuredQueries, Point-Free’s SQLite query builder, now has fully type-safe support for JSON and JSONB columns, including a
json_eachtable function, so nested data can be queried and updated by key path without leaving Swift’s type system.
Swift Evolution
The Swift project adds new language features through the Swift Evolution process. These are some of the proposals currently under review or recently accepted for a future Swift release.
Under active review:
- ST-0029 Include additional issue metadata in event stream - Today, Swift Testing’s JSON event stream reports only bare-bones details when an issue occurs, making it hard to tell a thrown error apart from a manual
Issue.recordcall. This proposal adds structured fields, includingerror,confirmationMiscount,exceededTimeLimit, andexpression, so tools like Xcode and VS Code can show richer, more specific failure information.
Recently accepted:
- SE-0544 Mutation and consumption in non-copyable type
deinits - Non-copyable types that manage a resource, like a file handle or buffer, often need to run the same cleanup logic in theirdeinitthat they use elsewhere, but until nowselfinside adeinitcould only be borrowed, not mutated or consumed. This proposal lets adeinitmutate or consume its own stored properties directly, so existing cleanup methods can be reused instead of duplicated. - ST-0028 Revise Swift Testing’s
Attachment/Encodableinterop - Swift Testing lets you attach extra data, like a screenshot or JSON snapshot, to a test for inspecting after a failure, but attaching custom types previously required extra setup code and offered no way to choose the encoding format. This proposal adds newAttachmentinitializers that let you attachEncodableorNSSecureCodingvalues directly, picking the format or supplying your own encoder.
Recently accepted with modifications:
- SE-0536 Package Registry Search - To use a package from a registry today, you already have to know its exact identifier, since there’s no standard way to discover packages within a registry the way other package ecosystems allow. This proposal adds an optional
/searchendpoint to the registry specification and aswift package-registry searchsubcommand, letting you find packages by name, scope, author, and other criteria, with support for qualifiers likeauthor:"Mona Lisa Octocat"and searches that span every configured registry at once. - SE-0516
Iterable- Looping over a collection in Swift traditionally means copying out one element at a time, which doesn’t work for newer types that can’t be copied, likeSpanandInlineArray. This proposal introducesIterable, a new way to loop over data without copying, and was renamed fromBorrowingSequenceand given support for typed throws before acceptance. - ST-0026 TaskLocal test trait - Task-local values are like settings, such as a feature flag, that apply only within a single task. Overriding one in a test previously meant writing a custom trait from scratch, but this proposal adds a
.taskLocal(_:_:)trait that does it in one line, like@Suite(.taskLocal(FeatureFlags.$isEnabled, true)).