Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Create Windows Store ready MSIX bundles for Tauri apps with multiarch and extension support

License

Notifications You must be signed in to change notification settings

soywiz-archive/tauri-windows-bundle

 
 

Repository files navigation

tauri-windows-bundle

npm codecov License

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-msvc

Installation

# 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-bundle

Tip: Use @latest with npx to bypass cached versions: npx @choochmeque/tauri-windows-bundle@latest --version

Usage

Initialize

npx @choochmeque/tauri-windows-bundle init

This creates:

  • src-tauri/gen/windows/bundle.config.json - MSIX-specific configuration
  • src-tauri/gen/windows/AppxManifest.xml.template - Manifest template
  • src-tauri/gen/windows/Assets/ - Icons (copied from src-tauri/icons/ or placeholders)
  • Adds @choochmeque/tauri-windows-bundle as devDependency
  • Adds tauri:windows:build script 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:

  • displayNameproductName
  • versionversion (auto-converted to 4-part: 1.0.01.0.0.0)
  • descriptionbundle.shortDescription
  • iconsbundle.icon
  • resourcesbundle.resources
  • signingbundle.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 npm

Output

target/msix/
├── MyApp_x64.msix
├── MyApp_arm64.msix      # if --arch x64,arm64
└── MyApp.msixbundle      # combined bundle

CLI 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 Explorer

Windows Extensions

File Associations

npx @choochmeque/tauri-windows-bundle extension add file-association
# Prompts for: name, extensions, description

Protocol Handlers

npx @choochmeque/tauri-windows-bundle extension add protocol
# Prompts for: protocol name, display name

Share Target

# Enable
npx @choochmeque/tauri-windows-bundle extension add share-target

# Disable
npx @choochmeque/tauri-windows-bundle extension remove share-target

Startup 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-task

Context 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 name

Background 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 list

App 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 name

App Service

Allow other apps to call into your app.

npx @choochmeque/tauri-windows-bundle extension add app-service
# Prompts for: service name

Toast 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-activation

Autoplay

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-settings

Thumbnail Handler

Provide custom thumbnails for your file types in Explorer.

npx @choochmeque/tauri-windows-bundle extension add thumbnail-handler
# Prompts for: CLSID, file types

Preview Handler

Provide custom file previews in Explorer.

npx @choochmeque/tauri-windows-bundle extension add preview-handler
# Prompts for: CLSID, file types

List Extensions

npx @choochmeque/tauri-windows-bundle extension list

Remove 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 open

Code Signing

Option 1: PFX Certificate

{
  "signing": {
    "pfx": "path/to/certificate.pfx",
    "pfxPassword": null
  }
}

Set password via environment variable:

export MSIX_PFX_PASSWORD=your-password

Option 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 init locally 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/*.msixbundle

Output will be in src-tauri/target/msix/YourApp.msixbundle.

License

MIT

About

Create Windows Store ready MSIX bundles for Tauri apps with multiarch and extension support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • TypeScript 99.5%
  • JavaScript 0.5%