Xwift
Planned

CLI

The planned xwift command-line interface. It is not available yet.

Planned: this CLI does not exist yet

Nothing on this page can be installed or run today. It documents the intended design so the direction is clear. To build for multiple targets right now, use plain SwiftPM as shown in Getting started.

The xwift CLI is meant to wrap the Xwift toolchain so that one command works for every target, with pinned toolchains and SDKs per project.

Planned commands

xwift new

Scaffold a new project with a pinned toolchain version and a CI workflow for the selected targets.

Planned
xwift new MyApp

xwift build --target

Build for a target platform. The CLI would select the right toolchain and SDK, for example the Swift SDK for WebAssembly for web.

Planned
xwift build --target macos
xwift build --target windows
xwift build --target web

xwift run --target

Build and run on a target, using the appropriate runner (natively, or wasmtime for WASI).

Planned
xwift run --target linux
xwift run --target web

Today’s equivalent

PlannedWhat you run today
xwift build --target <host>swift build
xwift run --target <host>swift run xwift-hello
xwift build --target webswift build -c release --swift-sdk swift-6.4.1-RELEASE_wasm --product xwift-hello
xwift run --target webwasmtime .build/release/xwift-hello.wasm

Command names, flags and target identifiers may change before the first release.

On this page