Swift
mise 可用于在同一系统上管理多个 swift 版本。Swift 支持 macos 和 linux。
用法
使用最新稳定版本的 swift:
sh
mise use -g swift
swift --version请参阅 面向 Swift 开发者的 mise 指南,了解如何将 mise 与 swift 一起使用。
工具选项
以下 tool-options 适用于 swift 后端。 这些选项放在 mise.toml 的 [tools] 部分中。
install_env
为由核心 swift 后端运行的安装时命令设置环境变量:
toml
[tools]
swift = { version = "latest", install_env = { HTTPS_PROXY = "http://proxy.example" } }设置
swift.gpg_verify
- Type:
boolean(optional) - Env:
MISE_SWIFT_GPG_VERIFY - Default:
None
Verify OpenPGP signatures for swift (built-in, no external gpg required). Set to false to disable.
swift.platform
- Type:
string - Env:
MISE_SWIFT_PLATFORM - Default:
"osx" | "windows10" | "ubuntu20.04" | "ubuntu22.04" | "ubuntu24.04" | "amazonlinux2" | "ubi9" | "fedora39"
Override the platform to use for precompiled binaries.