Swift 6.3, the latest release of the Apple-driven language for multiple platforms, offers more flexible C interoperability and improvements for cross-platform build tools. The official SDK for Android mobile application development also is featured.
Announced March 24, Swift 6.3 can be accessed at swift.org. For C interoperability, Version 6.3 debuts the @c attribute for exposing Swift functions and enums to C code in a project. Annotating a function or enum with @c prompts Swift to include a corresponding declaration in the generated C header that can be included in C/C++ files.
Also, Swift 6.3 has a preview of the Swift Build system integrated into Swift Package Manager. This preview brings a unified build engine across all supported platforms for a more consistent cross-platform development experience. Improvements to Swift Package Manager in Version 6.3 include a prebuilt Swift syntax for shared macro libraries, flexible inherited documentation, and discoverable package traits.
In the Android development vein, the Swift SDK for Android enables development of native Android programs in Swift and updating of Swift packages to support building for Android. Also, developers can use Swift Java and Swift Java JNI Core to integrate Swift code into existing Android applications written in Kotlin or Java.
Also in Swift 6.3:
- Module selectors are being introduced to specify which imported module Swift should look in for an API used in code.
- Embedded Swift has improvements ranging from enhanced C interoperability and better debugging support to meaningful steps toward a complete linkage model.
- For the core library, Swift Testing has improvements for areas including warning issues, test cancellation, and image attachments.
- Experimental capabilities are added to the DocC documentation compiler for markdown output, per-page static HTML content, and code block annotations.
- For performance control for library APIs, attributes were introduced that give library authors finer-grained control over compiler optimizations for clients of APIs.
Go to Source
Author: