XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Swift Forums - Latest posts

Latest posts

SE-0556: Cell, ConstCell, and Volatile

I was under the impression that ConstCells primary purpose was to represent the contents of a C T const* to a potentially non-const value. So that, for instance, a Swift implementation of a C function that takes a T* dst, T const* src, size_t len triple can import the parameters as dst: Span<Cell<T>>, src: Span<ConstCell<T>> and merely get tearing instead of undefined behavior if someone mutates src out from under you. Or to protect you from UB if the function in question is akin to memmove and…

Swift Language Models: bring any provider to Apple's Foundation Models API

Really cool! This is part of a broader movement, along with the LocalLM Lab SDK, built on a simple belief: app developers should not be limited to what the OS layer provides. One idea I keep advocating is “the best (AI) model for what it is best at". Apple’s on-device Foundation Model for simple tasks (I just posted how AnswerSearch uses it alongside a cloud AI provider to save costs). A cloud AI provider for more complex work, like text and images. Specialty models like Jev for decisions.

Using the on-device Foundation Model to decide when to call a cloud model

I'm sharing the open source version of AnswerSearch, a Mac app written in Swift. It uses Apple's on-device Foundation Model as a decision model: it answers simple questions locally and routes the rest to a cloud AI provider. It's on GitHub at ancientcomputing/answersearch-oss. AnswerSearch was meant as a simple alternative to web search for question answering: ask a question and get an answer, with links where relevant, rather than a list of pages to sort through. I published it on the Mac App…

SE-0556: Cell, ConstCell, and Volatile

Andrew_Trick: ConstCell should not be Sendable, even with type constraints. Sending a ConstCell across threads is equivalent to passing an inout across threads from a correctness perspective. The concurrency model is about more than memory safety. It also protects against data corruption caused by race conditions. Maybe I missed something but I would expect ConstCell to represent immutable data, and so not generally be subject to those sorts of data races? Is the concern that it could be…

SE-0556: Cell, ConstCell, and Volatile

Maybe it would help to distinguish between two possible aliasing semantics: Even if we have possibly-aliased/borrowing access to the outer value, we can assume that the inner value is non-aliased/mutating for some lifetime. (Which is unsafe, unless the mutation is instantaneous.) However, if the outer value is non-aliased/mutating, the inner value is still guaranteed to be non-aliased/mutating. The reverse direction: even if we have possibly-aliased/borrowing access to the inner value, we can…

SE-0556: Cell, ConstCell, and Volatile

My posts above came out of those same conversations (and a few others). However, I did realize as I was writing it up that we probably do want the aliased Span and Ref types to be copyable even when mutable. We can do by using non-Mutable Span and Ref and then preserving the correct interior mutability with the Cell vs. ConstCell distinction. However, the more I think about it, the more concerned I get about Span<Cell>. Here's the problem as I see it: We want to have (and already do have)…

SE-0556: Cell, ConstCell, and Volatile

I'd like to briefly post something John discussed with me so it can be on the forums; if we are taking the route of borrowing(aliased) style access, is it possible we should have an Aliased<T> type[1] which has aliasing semantics, but not interior mutability? Interior mutability is "morally" equivalent to casting away const, which is bad[2]. Since Cell as proposed has aliasing and interior mutability, we need a ConstCell for use with Span, Ref etc to avoid allowing this cast in safe Swift when…

Vscode-swift hits network every 2s (via swiftly)

Oof yeah this isn't ideal. I can expand on why this is happening. Every 2 seconds, the vscode-swift extension calls swiftly to check if the in-use toolchain has changed Every swiftly invocation performs an update check, as Slava noted. I agree Swiftly should not check for updates in every command; this ask was brought up in Commands that do not need network access always start outbound connections · Issue #586 · swiftlang/swiftly · GitHub. I'd also like a flag on all the commands in swiftly…

Explicit Copies Mode

I have an explicit copies mode available as an experimental feature as of 6.4.0. It still needs some more work to make it usable enough to graduate into normal feature, but as of now it does highlight all copies as they would exist under -Onone. To try it out, you can either do: -enable-experimental-feature ManualOwnership + on each function you care about, annotate with @diagnose(SemanticCopies, as: .warning) -enable-experimental-feature ManualOwnership -Wwarning SemanticCopies to cover the…

SE-0556: Cell, ConstCell, and Volatile

One issue with the proposal wording is that it’s very light on the tradeoff you’re accepting with Cell and I would love it if it was clearer on what you are giving up on: what you are giving up when you use Cell safely what you get in return what precautions you need to take if you use Cell’s unsafe pointer accessors So I’m glad to see you bring that up and I think it’s very important to flesh it out.

[Networking Workgroup] Public meeting — Monday, November 9, 2026 — Agenda and call for topics

The Networking Workgroup meets again on Monday, November 9, 2026, and everyone is welcome. Logistics When: Mon, Nov 9, 2026 4:30 PM UTC→Mon, Nov 9, 2026 5:30 PM UTC (see this time in your local timezone) Where: WebEx Draft agenda Welcome and recap of action items from the last meeting (5 min) Update: Currency types: IP Addresses and Ports (5 min) Requirements thread and open pull requests WebTransport client and server (10 min) Short presentation from @fpseverino, then feedback on the API…

[Pitch] Allowing Multiple Major Versions of a Package

This is a great question! There will also need to be some rigorous testing done to uncover where all the pain points here might arise, and I do think that diagnostics would be a foundational way to at the very least inform developers of said incompatibility when it arises. If I'm understanding correctly, there would have to be an explicit distinction between using FunNetworking_v1.FunDomainName vs FunNetworking_v2.DomainName and they would have to be treated as individual and different…

[Networking Workgroup] Public meeting — Monday, October 26, 2026 — Agenda and call for topics

Swift Networking Workgroup Meeting Notes Meeting Details Date: October 26, 2026 Summary The group agreed on CI and pull request review guidelines for the swift-networking-types repository. CI will require Swift 6.4 on all supported platforms, and pull requests will need at least one approval from a code owner, with a two-day soak period and a goal of resolving each one within a week. The initial IP address and port types will merge first, followed by benchmarking and testing infrastructure. The…

Consumption of class & global stored properties

nikolai.ruhe: your move-checker could warn/error on expressions involving self in code paths where properties are not fully initialized. Right. The new move checker would still statically diagnose use-after-consume's it can see within the body of the function it's analysing. For example, func arbitraryFunc() { /* ... */ } class Token { var sessionID: String func refresh() { let old = consume sessionID arbitraryFunc() print(sessionID) // error: 'self.sessionID' used after consume sessionID = old…

[Pitch] Support for custom scripts in DocC

Thanks @ronnqvist. I'm wondering what value the "custom-scripts.json" file adds to this feature Without custom-scripts.json, users can’t request libraries by URL, which is much more user-friendly than authors needing to download the library and manually embed it into their catalog. Requesting libraries by URL also reduces exposure to vulnerabilities: if you request the latest version (or the latest patch of a minor version) of a library, your documentation website will get dynamic security…

SE-0556: Cell, ConstCell, and Volatile

On the concurrency side... ConstCell should not be Sendable, even with type constraints. Sending a ConstCell across threads is equivalent to passing an inout across threads from a correctness perspective. The concurrency model is about more than memory safety. It also protects against data corruption caused by race conditions. Those issues are incredibly difficult to reproduce and diagnose. Atomic is meant to be Sendable. It has all the benefits of Cell and comes with concurrency semantics.…

SE-0556: Cell, ConstCell, and Volatile

Regarding aliasing and mutation: this is an implementation aspect of Cell I’d like to bring up. We’re faced with two options: A. Make all access to Cell, ConstCell, or any raw-layout type opaque to aliasing and mutation analysis throughout the compiler. B. Assume any Swift variable is subject to aliasing and mutation at any time. We should go with option A because the aliasing and mutation guarantees provided by Swift’s exclusivity rules are one of the most important memory optimization…

Annotating Reflection APIs Unavailable in Embedded

tshortli: I think SWIFT_ENABLE_REFLECTION is left over from earlier iterations on Embedded Swift and we ought to be able to switch to using @_unavailableInEmbedded on the Mirror APIs instead. In the future we may want reflection related features to get their own finer-grained availability domain too, but Mirror is still never going to be available in Embedded so it should be fine to annotate it as such now. @Douglas_Gregor what do you think? I agree that we should switch to using…

Coincide: a native AppKit app for coding agents (Claude Code, Codex, Cursor and more)

Hi all! I've been building Coincide, a free, open-source (MIT) macOS app written in Swift 6 with AppKit (and SwiftUI where it fits, like Settings). It's a native front end for the coding agents many of us already use: Claude Code, Codex, Cursor, Grok Build, OpenCode and Antigravity, all in one window with one model picker. It doesn't proxy anything. It drives each agent's own CLI with your existing login, in-process, over that agent's protocol: Claude Code: the claude stream-json control…

[Pitch] Support for custom scripts in DocC

Thanks for reviving this conversation. I'm wondering what value the "custom-scripts.json" file adds to this feature and if there exists a simpler solution that doesn't introduce a custom JSON manifest file. This pitch suggests the full solution that's designed to cover everything as the initial solution and defers to a future direction to simplify the common use case. I would like to see if that can be turned around; start with a simple solution for the most common problem but have a future…

State of `Differentiation` in Swift 6.4 updates

swift-differentiation-stdlib: prebuilt _Differentiation module for Apple platforms Starting with macOS and iOS 26.4, Apple's OSes no longer ship the _Differentiation module as part of their system libraries. swift-differentiation-stdlib is a new repository that fills this gap by shipping a prebuilt _Differentiation module as an XCFramework for macOS, iOS, and the iOS simulator. This is only relevant on Apple platforms. On Linux, _Differentiation still ships with the toolchain and works as it…

Layers of a native Swift networking stack?

Thanks for opening the discussion. First, I think we need to separate the HTTP client APIs (the protocols) from the discussion of how a concrete modern HTTP client is built. Both of those can be separated. In fact it helps separating the two since it allows us to focus on API design at a high level without having to solve everything from the bottom up. That separation was our goal with the HTTP API proposal repository and I think we proved that the separation holds. On a technical level this…

Introducing the Embedded Swift Platform Abstraction Layer

I've encountered what appears to be an issue with the prebuilt Embedded Swift PAL libraries in the macOS main-snapshot-2026-10-27 toolchain. For the armv7em-none-none-eabi target, both: libswiftEmbeddedPlatformPOSIX.a libswiftEmbeddedPlatformSingleThreaded.a are 88-byte archives containing only empty BSD symbol indices, with no object members or implementations. The Swift build configuration explicitly specifies NON_EMPTY_OBJECT_FILE for these libraries, introduced in commit 30ac3def87, so I…

Layers of a native Swift networking stack?

Jon_Shier: What do other languages and platforms do that Swift can learn from? There is GitHub - IndySockets/Indy: Indy - Internet Direct · GitHub library for Windows written in Pascal. I don’t know if its architecture is optimal, but the library itself is simply invaluable. I’m missing something like this written in Swift.

Revert post reactions to use just hearts?

JJJ: As to being a gendered component I thought so a couple of months ago, until I observed and realized that this is used by newer generations (both genders). So if you are hesitant of using reactions you are just showing your age ;-) I was wondering as much as well. Facebook and YouTube use for like, while Twitter, TikTok, and Instagram use for like.