Swift 6 Released: Compile-Time Data-Race Safety and Typed Throws
Swift 6 introduced an opt-in language mode that catches data races at compile time, added typed throws, a Synchronization library, Embedded Swift, and the new Swift Testing library.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
Swift 6 reached general availability on September 17, 2024, according to the official announcement on the Swift blog by Holly Borla of the Swift Core Team. Described as a major release that expands Swift to more platforms and domains, it emphasised that Swift is great for more than apps, including libraries, internet-scale services, and performance-critical and secure code.
Data-race safety
The headline feature was a new opt-in language mode that extends Swift's memory-safety guarantees to prevent data races in concurrent code by diagnosing potential data races as compiler errors. These checks were previously available only as warnings via a strict-concurrency flag in Swift 5.10; improved Sendable inference and new compiler analysis for transferring mutable state between actors reduced false positives. Swift 6 also added a new Synchronization library with low-level atomic operations and a mutex API.
Typed throws and ownership
Swift 6 enabled functions to specify the type of error they throw as part of their signature, for example throws(ParseError), which is useful in generic code and resource-constrained environments. Typed throws generalises over throwing and non-throwing functions. The release also extended the non-copyable types introduced in Swift 5.9 to work with the generics system, so generic code can operate on both copyable and non-copyable types, and added signed and unsigned 128-bit integer types across all platforms.
Embedded Swift and Swift Testing
The release included a preview of Embedded Swift, a language subset and compilation mode for embedded software such as microcontrollers, targeting bare-metal ARM and RISC-V. Swift 6 also introduced Swift Testing, a new testing library designed from the ground up for Swift with expressive macros like @Test and #expect, parameterised tests, and detailed failure output, included directly in the toolchain. Foundation was unified across platforms with a portable Swift implementation, and platform support expanded with a fully static Linux SDK and official Debian and Fedora support.
Why it mattered
Swift 6 marked the start of making data-race safety dramatically easier by turning a whole class of concurrency bugs into compile-time errors. Combined with typed throws, Embedded Swift and the built-in Swift Testing library, it broadened Swift's reach from apps into systems, embedded and server programming while strengthening its safety story.
Related on Skillo
See also: Swift 5.9 and its macro system.
Sources
Published date reflects the original event date (2024-09-17). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.