Swift 6.4 Makes Cross-Platform Builds Feel Less Fragmented

Swift 6.4 expands support across desktop, server, browser, Android and embedded development while adding safer memory handling and simpler language features.

Swift 6.4 is now available, bringing changes aimed at making development more consistent across platforms and more efficient in everyday code. The release covers build tooling, concurrency, interoperability, WebAssembly, Android, embedded systems and memory-safe performance improvements.

A more consistent build and debugging workflow

Swift Build is now the default build platform in Swift Package Manager, allowing projects to use the same build approach on Linux, macOS and Windows. Swift Package Manager also adds support for generating Software Bill of Materials documents in SPDX or CycloneDX formats.

Debugging has been updated through more precise dependency tracking for Swift modules in LLDB. As a result, debug builds on Linux and Windows, along with dSYM bundles on Darwin, are smaller because binary Swift modules are no longer embedded in them.

The Swift extension for VS Code is now available through the Open VSX Registry. This extends its availability to tools including Cursor, Antigravity and Kiro. Integration with Swiftly also helps developers select different Swift toolchains for a project.

Language and library updates

Several changes target clearer source code. Optional some and any types no longer require parentheses, while the new @diagnose attribute provides source-level control over compiler warnings. Module selectors can distinguish between identically named APIs from different modules.

Asynchronous functions can now run inside defer blocks and complete before the block exits. The withTaskCancellationShield API protects cleanup work from cancellation, including asynchronous operations such as flushing metrics before closing a file.

The Subprocess package has reached version 1.0. Built with Swift concurrency, it provides a cross-platform way to launch programs, interact with them and capture their output. Swift 6.4 also improves migration between Swift Testing and XCTest, adds repeatable test execution through swift test, and supports transferable attachments on Apple platforms.

Expanded platform interoperability

Swift 6.4 bridges Swift’s Span directly with C++20’s std::span, removing the need for manual conversion at that boundary. C interoperability gains an @implementation attribute for providing a Swift implementation for a C header, while safe wrappers can use Span instead of raw pointer-and-count pairs.

Swift/Java interoperability adds support for asynchronous and throwing functions in protocol and callback wrappers, automatic Runnable mapping for closures, variadic parameter imports and Java record types.

For WebAssembly, JavaScriptKit bridging is up to 40 times faster than earlier dynamic bridging, according to the release. The Wasm SDK is also available directly from Swift.org. Foundation adds FileManager support on WASI, while the Swift SDK for Android is built with Android’s LTS NDK 30. Swift Build now supports Android in Swift Package Manager without a post-install script.

Embedded Swift and safer performance

Embedded Swift gains generalized support for existential types, including any Protocol, enabling heterogeneous collections and broader use of Error. Developers can also enable EmbeddedRestrictions warnings across a target.

Performance work focuses on reducing unnecessary copies without abandoning memory safety. New UniqueArray and UniqueBox types support non-copyable values with different allocation and ownership behavior, while the Iterable protocol allows elements to be borrowed during iteration instead of copied.

Swift 6.4 also adds borrow and mutate accessors, stored Ref and MutableRef types, safer temporary memory allocation and safe byte-loading APIs for RawSpan variants. The release is available through the Swift.org installation instructions and Swiftly.

Original source: swift.org

This article was produced by NeonPulse.today using human and AI-assisted editorial processes, based on publicly available information. Content may be edited for clarity and style.

Avatar photo
GEAR-5

A meticulous tech analyst obsessed with silicon, circuitry, and impossible benchmarks. GEAR-5 tracks every hardware and gadget launch like a sacred ritual. His geek-level curiosity is as sharp as his thick-framed glasses, and his mission is simple: dissect every device from the future to reveal what’s truly worth it — and what’s just marketing smoke.

Articles: 861

Newsletter Updates

Enter your email address below and subscribe to our newsletter