Updates ·

Introducing Xwift

Why we are building a cross-platform toolchain for the Swift language, and what exists today.

By Teodor Walter Vido

The Swift language is a joy to write: fast, safe, expressive. The open-source compiler already targets far more than Apple platforms, yet shipping one codebase to macOS, Windows, Linux, Android, iOS and the Web is still a project in itself. Every target has its own toolchain setup, SDK, packaging story and set of gotchas.

Xwift is our attempt to make that boring. Write once. Run everything.

What Xwift is meant to be

Xwift is planned as four layers that work together:

  1. Toolchain. Based on Swift 6.4.1. Pinned and reproducible, with the right SDK for each target.
  2. CLI. One command, xwift, to create, build and run a project for any target (xwift new, xwift build --target …, xwift run --target …).
  3. UI framework. A declarative UI layer that renders natively per platform.
  4. System APIs. Portable access to the file system, networking, windows and devices.

What exists today

Honesty first: today Xwift is a proof of concept, not a product. It is a small SwiftPM package, Xwift, with a library, XwiftCore, and an executable, xwift-hello. It was built, tested and run on macOS, Linux (Ubuntu 24.04), Windows and WebAssembly (WASI) with stock Swift 6.4.1 toolchains, the official Swift SDK for WebAssembly and wasmtime.

The Xwift toolchain is in progress on Linux x86_64. It has been built privately and has not been released. Builds for macOS, Windows and Linux arm64 are planned.

The CLI, Android and iOS targets, the UI framework and the system APIs are roadmap items. They do not exist yet, and we label them that way everywhere: on the site, in the docs and in these posts.

A note on the name

While the project took shape, the toolchain went by the working name UniSwift and the proof-of-concept package by Unison. Both were placeholders. Xwift is the final name, and the package, its products and this site now use it.

Why start this small

A cross-platform toolchain lives or dies on the boring parts: pinned versions, checksums, reproducible builds. So we started there: one package, the same source, four targets. Everything we build next stands on that.

If you want to see exactly what works, read Getting started and the proof-of-concept write-up.

Xwift is an independent project and is not affiliated with or endorsed by Apple Inc. Swift is a trademark of Apple Inc.