0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WindowsでTauri+MinGWの環境構築

0
Last updated at Posted at 2026-05-16

はじめに

WindowsでTauriを使う場合、公式にはMSVC(Microsoft Visual C++)を強く推奨しているが、敢えてTauri+MinGWの環境構築を試してみたので手順をまとめる。

Tauriとは

  • フロントエンドのUIは、Web技術(HTML/CSS/JavaScript) で作る
  • バックエンドは、安全で高速な言語 Rust で作る
  • Windows/macOS/Linux/Android/iOS アプリを作れる

目次

Tauriインストール

1.MinGWインストール

MSYS2経由でMinGWをインストール。

  • MSYS2を https://www.msys2.org/ から取得しインストールする。
  • MSYS2より下記コマンドでMinGWをインストール
  • パスを設定C:\msys64\mingw64\bin
pacman -Syu
pacman -S mingw-w64-x86_64-toolchain

2.Rustインストール

winget install --id Rustlang.Rustup
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu

3.Node.jsとnpmインストール

winget install OpenJS.NodeJS.LTS

4.Tauri CLIインストール

cargo install tauri-cli

5.権限設定

Poweshellで設定

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

6.Version確認

cargo --version
rustc --version
node -v
npm -v
cargo tauri --version 

戻る

プロジェクト作成・ビルド

プロジェクト作成

npm create tauri-app@latest
# 設定例
✔ Project name · sample
✔ Identifier · sample
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, deno, bun)
✔ Choose your package manager · npm
✔ Choose your UI template · Vanilla
✔ Choose your UI flavor · JavaScript

ビルド実行

cd sample
npm install
npm run tauri build

exeファイルとインストーラ

下記に生成される

\sample\src-tauri\target\release\bundle\msi\sample_0.1.0_x64_en-US.msi
\sample\src-tauri\target\release\bundle\nsis\sample_0.1.0_x64-setup.exe

戻る

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?