Apple 发布了 Swift 6.4 版本,进一步强化了该编程语言的跨平台开发能力 1。Swift Build 现已成为 Swift Package Manager 的默认构建系统,支持在 Linux、macOS 和 Windows 上实现统一构建 1。此外,Subprocess 库已升级至 1.0 稳定版,为开发者提供了跨平台的子进程运行与交互方式 1。
本次更新在互操作性方面取得显著进展 1。Swift 与 Java 的互操作能力得到扩展,现支持异步、回调、自动 Runnable 映射以及 Java record 类型 1。C++20 的 std::span 与 Swift Span 实现了直接桥接,无需手动代码转换 1。WebAssembly 桥接性能得到大幅提升,相比此前提高了 40 倍,用户可直接从 Swift.org 获取 Wasm SDK 1。
性能与内存安全也是本版本的重点 1。嵌入式 Swift 功能进一步扩展,新增了存在类型和更丰富的错误处理支持 1。为增强内存安全性能,Swift 6.4 引入了 UniqueArray 和 UniqueBox 等非拷贝类型容器,在保证内存安全的同时提升了整体性能 1。
Apple has released Swift 6.4, a new version of its programming language that significantly expands cross-platform development capabilities.1 Swift Build is now the default build system for Swift Package Manager, enabling unified compilation across Linux, macOS, and Windows.1 The Subprocess library has reached version 1.0 stable status, providing cross-platform methods for running and interacting with subprocess operations.1
The release introduces major performance and interoperability improvements. WebAssembly bridge performance has increased 40-fold, with the Wasm SDK now available directly from Swift.org.1 Swift's interoperability with Java has been extended to support asynchronous operations, callbacks, automatic Runnable mapping, and Java record types.1 C++20's std::span can now be directly bridged with Swift Span without requiring manual code conversion.1
Additional enhancements include expanded embedded Swift capabilities, which now support optional types and more comprehensive error handling.1 The release also introduces new non-copying container types, including UniqueArray and UniqueBox, which improve performance while maintaining memory safety.1
评论
还没有评论,欢迎留下第一条。