Swift 6.4 Released
Recorded: Sept. 15, 2026, 4:32 p.m.
| Original | Summarized |
Swift 6.4 Released | Swift.org
Docs Community Packages Blog Install (6.4.0) Docs Community Packages Blog Install (6.4.0) Swift 6.4 Released Joe Heck Holly Borla September 15, 2026 Swift 6.4 is now available. Swift aims to be a great choice across the stack, from apps and servers to systems code, embedded devices, and the browser. This release deepens that support, and makes everyday code easier to write. Highlights include: Swift Build is now the default in Swift Package Manager, so your projects build the same way on Linux, macOS, and Windows. There’s so much more. Read on for a detailed guide to the new changes, or see the Swift Evolution dashboard for the full list of proposals in Swift 6.4. Swift 6.4 streamlines your day-to-day programming to make your code simpler and clearer. More natural optional some and any types. When writing an optional some or any type, you no longer have to wrap the type in parentheses. Instead of (some Rocket)?, you can simply write some Rocket? (SE-0521). You can combine asynchronous calls in defer blocks and cancellation shields to make sure that cleanup work always happens, no matter how the function returns: defer { try await processContents(of: handle) Richer core library APIs Improvements to Foundation and the standard library make it easier to use modern APIs with existing types. Swift 6.4 makes it easier to migrate existing projects to use Swift Testing. You can now safely use XCTAssert in Swift Testing tests or #expect within XCTests (ST-0021), and customize the values shown in failed expectations using the CustomTestReflectable protocol (ST-0022). swift test lets you repeat test cases to focus and save time (ST-0024) and record attachments that conform to the Transferable protocol on Apple platforms (ST-0023). Swift 6.4 brings a range of tooling improvements that make everyday development smoother, from debugging and building to editor support: More robust debugging. Swift 6.4 completes a multi-release overhaul of how the compiler tracks Swift modules in debug info — LLDB now imports modules through precise dependency tracking instead of ambiguous by-name lookups. Debug builds on Linux and Windows, and dSYM bundles on Darwin, shrink significantly since binary Swift modules are no longer embedded in them. Read the recent blog post Module Tracking in Swift Debug Info for a dive into the details. Deeper interoperability and platform support Swift’s interoperability expands its reach across more of the stack: from systems-level C++ to Android’s Java runtime, and from WebAssembly (Wasm) in the browser to Embedded Swift on microcontrollers. C: Pair @c with @implementation to use a Swift function to provide the implementation for a C header with no separate C declaration. Without @implementation, the compiler emits the declaration into the generated header. Either way, @c functions can get safe wrappers, such as a function that uses Span in place of a raw pointer-and-count pair. Swift’s platform support deepens as well. JavaScriptKit has better performance when bridging to Wasm in Swift 6.4, with safe bridging up to 40 times faster than earlier dynamic bridging. The Wasm SDK is available from the Install Swift page of Swift.org, so compiling Swift for the browser requires no extra setup beyond adding the SDK. Swift on Android continues to advance. This release of the Swift SDK for Android is built with the new LTS NDK 30, which provides Android availability attributes both in the Swift runtime libraries and for your Swift packages using the default NDK. Swift Build now supports Android in SwiftPM as well, removing the need for a post-install script. The earlier post Embedded Swift Improvements Coming in Swift 6.4 covers Embedded Swift’s other improvements in this release in more depth, including generalized support for existential types (such as any Protocol), which lets you naturally express heterogeneous collections and throw and catch any Error. Faster code that stays safe Swift 6.4 makes it easier to avoid unnecessary copies of your data while staying memory-safe, extending earlier work on Span, non-copyable types, and InlineArray. Work with values in memory without copying them. Borrow and mutate accessors let you read or update a Span or InlineArray through a property (SE-0507), non-copyable types can now conform to Equatable, Comparable, and Hashable, and new Ref and MutableRef types give you a first-class, storable container that lets you borrow or mutate one value at a time (SE-0519). Optionals of non-copyable types now work the same way, so you can inspect or update what’s inside an Optional without consuming it (SE-0532). Thank you Swift 6.4 reflects the contributions of many people across the Swift community, through code, proposals, forum discussions, and feedback. The community’s thoughts and real-world experience provide invaluable insights and motivation! Try out Swift 6.4 today by following the instructions on the Install Swift page, or download the new 6.4 toolchain with Swiftly. Authors Joe Heck Joe Heck works on Swift as part of the Open Source Program Office at Apple. Holly Borla Holly Borla is a member of the Swift Core Team and Language Steering Group, and the engineering manager of the Swift language team at Apple. Continue Reading Module Tracking in Swift Debug Info Read more
Docs Community Packages Blog Install Tools Xcode Visual Studio Code Emacs Neovim Cursor Other Editors Community Overview Swift Evolution Diversity Mentorship Contributing Governance Code of Conduct License Security Color scheme preference Light Dark Auto Copyright © 2026 Apple Inc. All rights reserved. Swift and the Swift logo are trademarks of Apple Inc. Privacy Policy Cookies API |
Swift 6.4 release focuses on expanding Swift's capabilities across the entire technology stack, aiming to facilitate development for applications, servers, systems code, embedded devices, and web environments while enhancing code clarity and safety. A major advancement is the harmonization of build systems, where Swift Build is now the default in Swift Package Manager, ensuring consistent project builds across Linux, macOS, and Windows. Furthermore, the Subprocess library has reached version 1.0, establishing a stable, cross-platform method for running and interacting with external programs using Swift concurrency. Interoperability has been significantly deepened, allowing Swift's Span type to interface directly with C++20's std::span, eliminating manual conversion for boundary interactions, and the Swift/Java interoperability layer now includes extended support for asynchronous functions and callbacks, automatic Runnable mapping, and support for Java record types. The release introduces numerous language features designed to simplify coding. This includes more natural handling of optional some and any types, allowing developers to omit parentheses, and source-level control over compiler warnings via the new @diagnose attribute. Module conflicts are resolved more explicitly through module selectors, enabling precise identification of the intended API source from multiple modules. Asynchronous operations are streamlined, allowing asynchronous code within defer blocks to await completion before exiting, and cancellation shielding using withTaskCancellationShield ensures that necessary cleanup operations execute reliably, even during task cancellation. Core library APIs have received enhancements, such as the addition of async/await support to components like ProgressManager and the introduction of fine-grained change notifications for @Observable types. Swift Testing has also been modernized, supporting features like XCTAssert, #expect, and customization via the CustomTestReflectable protocol, alongside tools for repeating test cases to improve efficiency. Documentation has also been improved, with the standard library content made open source. Performance and memory safety are further addressed through new data structures. Swift 6.4 introduces new array types and the Iterable protocol to facilitate iterating over collections without unnecessary copying, alongside the introduction of Ref and MutableRef types, which serve as first-class containers for values, enabling borrowing or mutating access to a single value. UniqueBox and UniqueArray provide heap allocation management that avoids the overhead of copy-on-write allocations, and withTemporaryAllocation offers a managed scratch buffer for safe memory operations. Safe loading APIs have been implemented for RawSpan and its variants, safely replacing unsafe memory access functions. Platform support is broadened across various domains. Swift's integration with WebAssembly (Wasm) has seen substantial performance gains, with JavaScriptKit bridging to Wasm enhanced to operate up to forty times faster, and the Wasm SDK is now available directly from Swift.org. Foundation updates also improve FileManager support on WASI. For Android development, the Swift SDK now leverages the NDK 30, and Swift Build supports Android integration within Swift Package Manager without requiring external post-install scripts. Embedded Swift gains richer capabilities, including generalized support for existential types, allowing for more flexible expression of heterogeneous collections and error handling. A new EmbeddedRestrictions warning provides a mechanism to enable specific restrictions across entire targets. Tooling improvements also contribute to a smoother development experience; the debugging process is enhanced with more precise Swift module tracking in debug information, and IDE support is broadened by making the VS Code extension available on the Open VSX Registry, integrating further with tools like Swiftly. |