Windows
Build native Windows desktop applications with Bini.js.
Windows Overview
Bini.js allows you to build native Windows desktop applications using Tauri v2. Your React app is wrapped in a WebView2 binary, providing a native experience with full system access.
Windows executable (.exe) with Authenticode signing
Authenticode signing support for trusted distribution
Full access to Windows APIs via Tauri
Requirements
Building Windows desktop apps requires different tools depending on your operating system. See the section for your OS below.
- On Windows: Node.js, Microsoft C++ Build Tools, the WebView2 Runtime, and Rust - everything runs locally.
- On macOS or Linux: Node.js, Git, a GitHub account, and the ability to push a repo. The Windows build itself runs on GitHub Actions.
.exe directly from macOS or Linux. Tauri v2 has no supported local cross-compilation path for Windows. The recommended way is GitHub Actions on a windows-latest runner, described in each section below.Windows
On Windows you can scaffold, develop, and build the app entirely on your own machine - no CI required.
Step 1: Install the tools
- Node.js 20.19.0 or higher
- Microsoft C++ Build Tools - Download (install the "Desktop development with C++" workload)
- Microsoft Edge WebView2 Runtime - Download
- Rust via rustup
Step 2: Create the project
Create the Project
Create a new Bini.js project targeting Windows and install its dependencies:
$ npx create-bini-app@latest my-app --platform windows $ cd my-app $ npm install
Or use the interactive prompt and select Windows Desktop:
$ npx create-bini-app@latest
? Select target platform:Web Application> Windows DesktopLinux DesktopmacOS DesktopAndroidiOS↑↓ navigate • ⏎ select
Step 3: Develop and build
Run tauri:dev to open your app in a native window, then tauri:build to produce the executable and installer:
$ npx create-bini-app@latest my-app --platform windows $ cd my-app $ npm install $ npm run tauri:dev $ npm run tauri:build
--sign during scaffold to set up Authenticode signing.macOS
A native Windows .exe cannot be produced on macOS - Tauri relies on Windows-only toolchains (MSVC, WebView2, WiX/NSIS). The Tauri team's own recommendation is to build Windows apps on a windows-latest runner in CI.
Step 1: Install the tools
Install Node.js 20.19.0 or higher and Git. Git comes with the Xcode command line tools - run xcode-select --install if you do not have it yet.
Step 2: Create the project
Create the Project
Create a new Bini.js project targeting Windows and install its dependencies:
$ npx create-bini-app@latest my-app --platform windows $ cd my-app $ npm install
Or use the interactive prompt and select Windows Desktop:
$ npx create-bini-app@latest
? Select target platform:Web Application> Windows DesktopLinux DesktopmacOS DesktopAndroidiOS↑↓ navigate • ⏎ select
Add the Build Workflow
The scaffold does not ship with a GitHub Actions workflow. You need to add one manually. Create the file .github/workflows/build-windows.yml inside your project with the following content:
# .github/workflows/build-windows.yml
name: Build Windows App
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Install dependencies
run: npm install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: 'App v__VERSION__'
releaseDraft: truePush to GitHub
Run npm run deploy and choose Windows. This initializes the repo, commits, and pushes everything to GitHub in one step:
$ npm run deploy
Once pushed, the workflow runs on a real Windows runner and builds the installer.
Download the Installer
- Open your repository on GitHub and go to the Actions tab.
- Open the latest
Build Windows Apprun. - Under Artifacts, download
windows-build. Or, if a release was created, download the.exe/.msifrom the Releases page.
windows-latest is the supported path.Linux
A native Windows .exe cannot be produced on Linux - Tauri relies on Windows-only toolchains (MSVC, WebView2, WiX/NSIS). The Tauri team's own recommendation is to build Windows apps on a windows-latest runner in CI.
Step 1: Install the tools
Install Node.js 20.19.0 or higher and Git with your package manager, for example sudo apt install git on Debian and Ubuntu.
Step 2: Create the project
Create the Project
Create a new Bini.js project targeting Windows and install its dependencies:
$ npx create-bini-app@latest my-app --platform windows $ cd my-app $ npm install
Or use the interactive prompt and select Windows Desktop:
$ npx create-bini-app@latest
? Select target platform:Web Application> Windows DesktopLinux DesktopmacOS DesktopAndroidiOS↑↓ navigate • ⏎ select
Add the Build Workflow
The scaffold does not ship with a GitHub Actions workflow. You need to add one manually. Create the file .github/workflows/build-windows.yml inside your project with the following content:
# .github/workflows/build-windows.yml
name: Build Windows App
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Install dependencies
run: npm install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: 'App v__VERSION__'
releaseDraft: truePush to GitHub
Run npm run deploy and choose Windows. This initializes the repo, commits, and pushes everything to GitHub in one step:
$ npm run deploy
Once pushed, the workflow runs on a real Windows runner and builds the installer.
Download the Installer
- Open your repository on GitHub and go to the Actions tab.
- Open the latest
Build Windows Apprun. - Under Artifacts, download
windows-build. Or, if a release was created, download the.exe/.msifrom the Releases page.
windows-latest is the supported path.Development
Running tauri:dev opens your app in a native Windows window. This requires a Windows machine with the requirements installed (see the Windows section):
$ npm run tauri:dev
This launches your app in a native Windows window with:
- Hot reload for frontend changes
- Native window with system tray support
- Access to Windows APIs
- Devtools for debugging
Building
Build a distributable Windows executable. On Windows this runs locally; on macOS and Linux it runs in GitHub Actions (see those sections):
$ npm run tauri:build
The build outputs land in src-tauri/target/release/bundle/:
Output Files
nsis/*.exe- NSIS installer (recommended for distribution)msi/*.msi- WiX MSI installerrelease/my-app.exe- The raw executable (before bundling)
Code Signing
Bini.js supports Authenticode code signing for Windows binaries. Configure signing in src-tauri/tauri.conf.json:
{
"bundle": {
"windows": {
"certificateThumbprint": "YOUR_CERT_THUMBPRINT",
"digestAlgorithm": "sha256",
"timestampUrl": "http://timestamp.digicert.com"
}
}
}For GitHub Actions, store the certificate and password as secrets and reference them in the workflow. The tauri-action step reads them from environment variables:
GitHub Actions workflow with signing
# .github/workflows/build-windows.yml
name: Build Windows App
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Install dependencies
run: npm install
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: 'App v__VERSION__'
releaseDraft: true