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.
xwift new MyAppxwift 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.
xwift build --target macos
xwift build --target windows
xwift build --target webxwift run --target
Build and run on a target, using the appropriate runner (natively, or wasmtime for WASI).
xwift run --target linux
xwift run --target webToday’s equivalent
| Planned | What you run today |
|---|---|
xwift build --target <host> | swift build |
xwift run --target <host> | swift run xwift-hello |
xwift build --target web | swift build -c release --swift-sdk swift-6.4.1-RELEASE_wasm --product xwift-hello |
xwift run --target web | wasmtime .build/release/xwift-hello.wasm |
Command names, flags and target identifiers may change before the first release.