@choochmeque/tauri-windows-bundle
v0.1.12
Published
MSIX packaging tool for Tauri apps - Windows Store ready bundles
Downloads
1,682
Maintainers
Readme
tauri-windows-bundle
MSIX packaging tool for Tauri apps - create Windows Store ready bundles with multiarch support.
Features
- MSIX Packaging - Create Store-ready MSIX packages
- Multiarch Support - Build for x64 and arm64 in one bundle
- tauri.conf.json Integration - Automatically reads app name, version, icons, and resources
- Code Signing - Support for PFX certificates and Windows certificate store
- Windows Extensions - Share Target, File Associations, Protocol Handlers, Startup Task, Context Menus, Background Tasks, App Execution Alias, App Services, Toast Activation, Autoplay, Print Task Settings, Thumbnail/Preview Handlers
Prerequisites
- Rust with Windows targets
- msixbundle-cli (auto-installed on first build)
- Windows SDK (for signing)
# Install Rust targets for multiarch builds
rustup target add x86_64-pc-windows-msvc
rustup target add aarch64-pc-windows-msvcInstallation
# One-time setup (use @latest to ensure newest version)
npx @choochmeque/tauri-windows-bundle@latest init
# Or install as dev dependency
npm install -D @choochmeque/tauri-windows-bundleTip: Use
@latestwith npx to bypass cached versions:npx @choochmeque/tauri-windows-bundle@latest --version
Usage
Initialize
npx @choochmeque/tauri-windows-bundle initThis creates:
src-tauri/gen/windows/bundle.config.json- MSIX-specific configurationsrc-tauri/gen/windows/AppxManifest.xml.template- Manifest templatesrc-tauri/gen/windows/Assets/- Icons (copied fromsrc-tauri/icons/or placeholders)- Adds
@choochmeque/tauri-windows-bundleas devDependency - Adds
tauri:windows:buildscript to package.json
Note: If Tauri icons exist in src-tauri/icons/, they are automatically copied. The wide tile (310x150) is generated by centering the square icon.
Configure
Edit src-tauri/gen/windows/bundle.config.json:
{
"publisher": "CN=YourCompany",
"publisherDisplayName": "Your Company Name",
"capabilities": {
"general": ["internetClient"]
},
"signing": {
"pfx": null,
"pfxPassword": null
}
}Capabilities are validated at build time. Three types are supported:
{
"capabilities": {
"general": ["internetClient", "internetClientServer", "privateNetworkClientServer"],
"device": ["webcam", "microphone", "location", "bluetooth"],
"restricted": ["broadFileSystemAccess", "allowElevation"]
}
}general- Standard capabilities (<Capability>)device- Device access (<DeviceCapability>)restricted- Requires Store approval (<rescap:Capability>)
Note: runFullTrust is always auto-added (required for Tauri apps).
Auto-read from tauri.conf.json:
displayName←productNameversion←version(auto-converted to 4-part:1.0.0→1.0.0.0)description←bundle.shortDescriptionicons←bundle.iconresources←bundle.resourcessigning←bundle.windows.certificateThumbprint
Build
# Build x64 only (default, uses cargo, release mode)
pnpm tauri:windows:build
# Build multiarch bundle (x64 + arm64)
pnpm tauri:windows:build --arch x64,arm64
# Debug build (release is default)
pnpm tauri:windows:build --debug
# Use different build runner (pnpm, npm, yarn, bun, etc.)
pnpm tauri:windows:build --runner pnpm
pnpm tauri:windows:build --runner npmOutput
target/msix/
├── MyApp_x64.msix
├── MyApp_arm64.msix # if --arch x64,arm64
└── MyApp.msixbundle # combined bundleCLI Reference
npx @choochmeque/tauri-windows-bundle init [options]
-p, --path <path> Path to Tauri project
npx @choochmeque/tauri-windows-bundle build [options]
--arch <archs> Architectures (comma-separated: x64,arm64) [default: x64]
--debug Build in debug mode (release is default)
--min-windows <ver> Minimum Windows version [default: 10.0.17763.0]
--runner <runner> Build runner (cargo, pnpm, npm, yarn, bun) [default: cargo]
--verbose Show full build output instead of spinner
npx @choochmeque/tauri-windows-bundle extension list
-p, --path <path> Path to Tauri project
npx @choochmeque/tauri-windows-bundle extension add <type>
<type> Extension type (see below)
-p, --path <path> Path to Tauri project
npx @choochmeque/tauri-windows-bundle extension remove <type> [name]
<type> Extension type (see below)
[name] Extension identifier (required for most types)
-p, --path <path> Path to Tauri project
Extension types:
file-association Associate file types with your app
protocol Register URL protocol handlers (myapp://)
share-target Receive shared content from other apps
startup-task Run app on Windows login
context-menu Add right-click menu items in Explorer
background-task Run tasks when app is not in foreground
app-execution-alias Run app from command line (e.g., myapp)
app-service Allow other apps to call into your app
toast-activation Handle toast notification clicks
autoplay Launch when media/device is inserted
print-task-settings Custom print settings UI
thumbnail-handler Custom file thumbnails in Explorer
preview-handler Custom file previews in ExplorerWindows Extensions
File Associations
npx @choochmeque/tauri-windows-bundle extension add file-association
# Prompts for: name, extensions, descriptionProtocol Handlers
npx @choochmeque/tauri-windows-bundle extension add protocol
# Prompts for: protocol name, display nameShare Target
# Enable
npx @choochmeque/tauri-windows-bundle extension add share-target
# Disable
npx @choochmeque/tauri-windows-bundle extension remove share-targetStartup Task
Run your app automatically when Windows starts.
# Enable
npx @choochmeque/tauri-windows-bundle extension add startup-task
# Disable
npx @choochmeque/tauri-windows-bundle extension remove startup-taskContext Menu
Add right-click menu items in Windows Explorer.
npx @choochmeque/tauri-windows-bundle extension add context-menu
# Prompts for: menu name, file types, display nameBackground Task
Run tasks when app is not in foreground.
npx @choochmeque/tauri-windows-bundle extension add background-task
# Prompts for: task name, type (timer/systemEvent/pushNotification)List Extensions
npx @choochmeque/tauri-windows-bundle extension listApp Execution Alias
Run your app from command line (e.g., myapp instead of full path).
npx @choochmeque/tauri-windows-bundle extension add app-execution-alias
# Prompts for: alias nameApp Service
Allow other apps to call into your app.
npx @choochmeque/tauri-windows-bundle extension add app-service
# Prompts for: service nameToast Activation
Handle toast notification clicks and actions.
# Enable
npx @choochmeque/tauri-windows-bundle extension add toast-activation
# Disable
npx @choochmeque/tauri-windows-bundle extension remove toast-activationAutoplay
Launch your app when media or devices are inserted.
npx @choochmeque/tauri-windows-bundle extension add autoplay
# Prompts for: verb, action display name, event type (content/device)Print Task Settings
Add custom print settings UI.
# Enable
npx @choochmeque/tauri-windows-bundle extension add print-task-settings
# Disable
npx @choochmeque/tauri-windows-bundle extension remove print-task-settingsThumbnail Handler
Provide custom thumbnails for your file types in Explorer.
npx @choochmeque/tauri-windows-bundle extension add thumbnail-handler
# Prompts for: CLSID, file typesPreview Handler
Provide custom file previews in Explorer.
npx @choochmeque/tauri-windows-bundle extension add preview-handler
# Prompts for: CLSID, file typesList Extensions
npx @choochmeque/tauri-windows-bundle extension listRemove Extension
npx @choochmeque/tauri-windows-bundle extension remove file-association myfiles
npx @choochmeque/tauri-windows-bundle extension remove protocol myapp
npx @choochmeque/tauri-windows-bundle extension remove context-menu open-with-myapp
npx @choochmeque/tauri-windows-bundle extension remove background-task sync-task
npx @choochmeque/tauri-windows-bundle extension remove app-execution-alias myapp
npx @choochmeque/tauri-windows-bundle extension remove app-service com.myapp.service
npx @choochmeque/tauri-windows-bundle extension remove autoplay openCode Signing
Option 1: PFX Certificate
{
"signing": {
"pfx": "path/to/certificate.pfx",
"pfxPassword": null
}
}Set password via environment variable:
export MSIX_PFX_PASSWORD=your-passwordOption 2: Windows Certificate Store
Use thumbprint from tauri.conf.json:
{
"bundle": {
"windows": {
"certificateThumbprint": "ABC123..."
}
}
}GitHub Actions
Example workflow for automated MSIX builds.
Note: Run
npx @choochmeque/tauri-windows-bundle@latest initlocally first to generate the required configuration files, then commit them to your repository.
name: Build Windows MSIX
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Setup Rust
uses: dtolnay/rust-action@stable
with:
targets: x86_64-pc-windows-msvc, aarch64-pc-windows-msvc
- name: Install dependencies
run: pnpm install
- name: Build MSIX bundle
run: pnpm tauri:windows:build --arch x64,arm64 --runner pnpm
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: msix-bundle
path: src-tauri/target/msix/*.msixbundleOutput will be in src-tauri/target/msix/YourApp.msixbundle.
