分发
Tauri 提供您所需的工具,用于将应用程序分发到平台应用商店或作为平台特定的安装程序。
Tauri 通过 build、android build 和 ios build 命令直接从其 CLI 构建您的应用程序。
npm run tauri buildyarn tauri buildpnpm tauri builddeno task tauri buildbun tauri buildcargo tauri build请参阅分发部分,了解有关每个捆绑包的配置选项以及如何将其分发给用户的更多信息。
默认情况下,build 命令会自动根据配置的格式捆绑您的应用程序。
如果您需要进一步自定义平台捆绑包的生成方式,您可以将构建和捆绑步骤分开。
npm run tauri build -- --no-bundle# bundle for distribution outside the macOS App Storenpm run tauri bundle -- --bundles app,dmg# bundle for App Store distributionnpm run tauri bundle -- --bundles app --config src-tauri/tauri.appstore.conf.jsonyarn tauri build --no-bundle# bundle for distribution outside the macOS App Storeyarn tauri bundle --bundles app,dmg# bundle for App Store distributionyarn tauri bundle --bundles app --config src-tauri/tauri.appstore.conf.jsonpnpm tauri build --no-bundle# bundle for distribution outside the macOS App Storepnpm tauri bundle --bundles app,dmg# bundle for App Store distributionpnpm tauri bundle --bundles app --config src-tauri/tauri.appstore.conf.jsondeno task tauri build --no-bundle# bundle for distribution outside the macOS App Storedeno task tauri bundle --bundles app,dmg# bundle for App Store distributiondeno task tauri bundle --bundles app --config src-tauri/tauri.appstore.conf.jsonbun tauri build --no-bundle# bundle for distribution outside the macOS App Storebun tauri bundle --bundles app,dmg# bundle for App Store distributionbun tauri bundle --bundles app --config src-tauri/tauri.appstore.conf.jsoncargo tauri build --no-bundle# bundle for distribution outside the macOS App Storecargo tauri bundle --bundles app,dmg# bundle for App Store distributioncargo tauri bundle --bundles app --config src-tauri/tauri.appstore.conf.json您的应用程序版本可以在 tauri.conf.json > version 配置选项中定义,这是管理应用程序版本的推荐方式。如果该配置值未设置,Tauri 将使用您 src-tauri/Cargo.toml 文件中的 package > version 值。
代码签名通过对您的应用程序可执行文件和捆绑包应用数字签名,验证您作为应用程序提供者的身份,从而增强应用程序的安全性。
大多数平台都需要签名。有关更多信息,请参阅每个平台的文档。
了解如何为每个平台分发您的应用程序。
对于 Linux,您可以使用 Debian 包、Snap、AppImage、Flatpak、RPM 或 Arch 用户仓库 (AUR) 格式分发您的应用程序。
对于 macOS,您可以直接将应用程序分发到 App Store,或发布 DMG 安装程序以供直接下载。两种方法都需要代码签名,在 App Store 之外分发还需要公证。
代码签名和公证
了解如何分发到 Microsoft Store 或配置 Windows 安装程序。
将您的 Android 应用程序分发到 Google Play。
了解如何将您的应用程序上传到 App Store。
将您的应用程序分发到提供全球分发并支持开箱即用自动更新的云服务。
© 2025 Tauri 贡献者。CC-BY / MIT