On behalf of the Swift Website Workgroup, I'm thrilled to announce the Swift.org Redesign Project! This project aims to modernize the website's appearance, enhance the experience for all visitors, and better support the evolving needs of our community. The redesign will reflect the forward-thinking spirit of the Swift language while providing a more engaging and intuitive experience on the site. We believe the best way of achieving this is by including the Swift community in every step of the...| Swift Forums
Swift Forums| forums.swift.org
Hi all, I've been testing isolated conformance inference in combination with other features, especially default main-actor isolation (which implies InferIsolatedConformances) , and I've found a few places where we probably want to tweak the inference rules. Conformance to Sendable-inheriting protocols If a protocol inherits Sendable, the conformance to it cannot have actor isolation because that would admit data races when it is used with generic code: protocol P: Sendable { } @MainActor cla...| Swift Forums
I'm excited to share a new actor system we've been building for Swift's distributed actors: swift-erlang-actor-system. This actor system enables Swift programs to join a distributed Erlang cluster. Here's an example of a simple chat program using the actor system: Demo Video Erlang (and other languages that run on its VM) can connect multiple runtime systems together with distributed Erlang. Each runtime is referred to as a "node". Erlang also supports "C nodes", which allow a program other ...| Swift Forums
Accompanying Ole's great work on getting a pure Swift environment up and running on the Raspberry Pi Pico I've been working on implementing a hardware access layer for the RP2040. Here are the first results: RP2040MMIO. The package is based on Swift MMIO. It provides access to all of the RP2040's peripherals and their registers. Overall it's about 35k lines of generated Swift source code. I have not yet managed to compile actual RP2040 code. Currently there's still a bug that prevents macros ...| Swift Forums
Hello! @rauhul, @Philippe_Hausler and myself have assembled a repository with several simple example projects that show how to use Embedded Swift to target a range of MCUs (STM32, Raspberry Pi Pico, nRF, and even a RISC-V ESP32), how to integrate with existing SDKs, and how to control some interesting peripherals. The repository is available here: Note that the repository contains code that is not supposed to be continuously developed, but instead it should serve as an educational and demons...| Swift Forums
Hi all, I wrote a blog post about my experience bringing Swift to the Playdate using the embedded language mode. Please feel free to discuss the blog post here.| Swift Forums
On behalf of the Swift Website Workgroup, I'm excited to announce the Swift Information Architecture Project! This project aims to design and implement a unified information architecture for content across the Swift project, including the content on Swift.org. We believe the best way of achieving this is by including the Swift community in the process and invite you to read the project brief below to learn more about the project and how you can participate. ℹ This project ...| Swift Forums
Hi folks! A few months ago I shared my Swift SDK for Darwin, which allows you to build iOS Swift Packages on Linux, amongst other things. I mentioned that a lot of work still needed to be done, such as handling codesigning, packaging, and bundling. I'm super excited to share that we've finally reached the point where all of these things are now possible with cross-platform, open source software. Enter, xtool! About xtool does a lot of things (because Xcode does a lot of things 😅)...| Swift Forums
Hi folks, The review of SE-0461: Run nonisolated async functions on the caller's actor by default begins now and runs through March 2, 2025. This proposal is one that's been contemplated in the recently approved vision document to improve the approachability of Swift's data-race safety facilities. Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to the review ma...| Swift Forums
Hi, folks. Central to the overall Swift concurrency effort is the ability to directly express what we call asynchronous functions . An asynchronous function still returns a result or throws an error, but it does so asynchronously — that is, after a long enough potential delay that it's valuable to allow the thread to go on with other work in the meantime. Traditionally this has been expressed with explicit callbacks (often called "completion handlers" in the Apple ecosystem), but that sacri...| Swift Forums
Hello all, One of the main parts of the Swift Concurrency model is actors, which provide a mechanism for isolating state in concurrent programs to eliminate data races. This proposal introduces actors and actor isolation into Swift. It is part of the Swift Concurrency effort detailed in the roadmap thread. This post has a subset of the proposal. The latest, full version of the proposal is always available here. Doug Actors Introduction The actor model involves entities called actors. Each ac...| Swift Forums
With Swift 6.0 and the Swift 6 language mode now released, Swift language development under the Language Steering Group is now focused on three major areas: making Swift Concurrency easier to approach and adopt, providing powerful low-level language and library tools for high-performance programming and constrained environments, and improving language interoperability, especially with C++ and Java. The Swift 6 language mode provides a strong base for Swift Concurrency, but many developers are...| Swift Forums
This is sort of a follow-up on Embedded Swift running on the Raspberry Pi Pico, but with a different take. I managed to create a very small Embedded Swift "toolchain" for building pure Swift executables for the Raspberry Pi Pico (it might also work with other RP2040 boards, but I'm only testing on the Pico). The "toolchain" is just a Makefile, so no SwiftPM integration yet, but I feel we're not too far off. The repository is here if you want to try it out: It should work on macOS and Linux a...| Swift Forums
Hi Swift Community, The review of SE-0199 “Adding toggle method to Bool” begins now and runs through February 19th, 2018. Reviews are an important part of the Swift evolution process. All reviews should be made in this thread on the Swift forums or, if you would like to keep your feedback private, directly in email to me as the review manager. The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of S...| Swift Forums
We have some exciting news to share about the future of Foundation. As announced at ServerSide.swift and on the Swift blog we are embarking on a project to create a unified implementation of Foundation, written in Swift, for all platforms. An important part of our vision is to provide the option of smaller, more granular modules for server side apps. I'd like to kick off some discussion about the project by walking through a breakdown of which types should appear in which modules. Module Bre...| Swift Forums
Hey all, As Swift evolves, it gains new language features and capabilities. One of the ways in which it grows is via new syntactic sugar to eliminate common boilerplate, taking something that can be written out in long-form and making it more concise. Such features don't technically add any expressive power to the language, because you can always write the long-form version, but their effect can be transformational if it enables use cases that would otherwise have been unwieldy. Such language...| Swift Forums
Hi all, Introduction The “Complete Generics” goal for Swift 3 has been fairly ill-defined thus fair, with just this short blurb in the list of goals: Complete generics: Generics are used pervasively in a number of Swift libraries, especially the standard library. However, there are a number of generics features the standard library requires to fully realize its vision, including recursive protocol constraints, the ability to make a constrained extension conform to a new protocol (i.e., an...| Swift Forums
A PR with this document can be found here Swift Concurrency Roadmap Our goal is to make concurrent programming in Swift convenient, efficient, and safe. This document outlines a number of proposed additions and changes to the language to achieve this, through the implementation of asynchronous functions and actors. These additions will be proposed separately, but they will in many cases depend on each other. This document serves to join them together. Unlike a manifesto, which might describe...| Swift Forums