docs/lang/swift.md
mise can be used to manage multiple versions of swift on the same system. Swift is supported on macOS and Linux.
Install Swift for the current project and check the selected toolchain:
mise use swift@latest
mise exec -- swift --version
Use mise use -g swift@latest for a personal default. In an existing Swift package
with Package.swift, run mise exec -- swift build to build it.
On Linux, Swift archives target specific distributions and require compatible system libraries. mise records the selected distribution in lockfile options; use a lock entry built for your target distribution. The Swift core plugin does not currently support Windows.
See a mise guide for Swift developers for how to use mise with swift.
The following tool-options are available for the swift backend.
These options go in the [tools] section of mise.toml.
install_envSet environment variables for install-time commands run by the core swift backend:
[tools]
swift = { version = "latest", install_env = { HTTPS_PROXY = "http://proxy.example" } }