Swift 6.3

https://news.ycombinator.com/rss Hits: 12
Summary

Swift is designed to be the language you reach for at every layer of the software stack. Whether you’re building embedded firmware, internet-scale services, or full-featured mobile apps, Swift delivers strong safety guarantees, performance control when you need it, and expressive language features and APIs. Swift 6.3 makes these benefits more accessible across the stack. This release expands Swift into new domains and improves developer ergonomics across the board, featuring: More flexible C interoperability Improvements to cross-platform build tooling Improvements for using Swift in embedded environments An official Swift SDK for Android Read on for an overview of the changes and next steps to get started. Language and Standard Library Swift 6.3 introduces the @c attribute, which lets you expose Swift functions and enums to C code in your project. Annotating a function or enum with @c prompts Swift to include a corresponding declaration in the generated C header that you can include in your C/C++ files: @c func callFromC() { ... } // Generated C header void callFromC(void); You can provide a custom name to use for the generated C declaration: @c(MyLibrary_callFromC) func callFromC() { ... } // Generated C header void MyLibrary_callFromC(void); @c also works together with @implementation. This lets you provide a Swift implementation for a function declared in a C header: // C header void callFromC(void); // Implementation written in Swift @c @implementation func callFromC() { ... } When using @c together with @implementation, Swift will validate that the Swift function matches a pre-existing declaration in a C header, rather than including a C declaration in the generated header. Swift 6.3 introduces module selectors to specify which imported module Swift should look in for an API used in your code. If you import more than one module that provides API with the same name, module selectors let you disambiguate which API to use: import ModuleA import ModuleB let x = Mo...

First seen: 2026-03-26 10:06

Last seen: 2026-03-27 06:20