Tauri 2 + TypeScript + Vite で構築した Misskey 向けデスクトップブラウザです。
現在は https://misskey.io のみをアプリ内 WebView で開き、それ以外の http/https 遷移や新規ウィンドウ要求は既定の外部ブラウザへ委譲する構成になっています。
- 起動時に
misskey.ioをメインウィンドウで開く - ウィンドウタイトルをページタイトルに追従させる
https://misskey.ioだけを WebView 内で許可するmisskey.io以外へのhttp/https通常遷移を外部ブラウザで開くwindow.openなどの別窓要求でmisskey.io以外へ出る場合も外部ブラウザで開く- 非
http/httpsスキームの遷移は WebView 内で拒否する - Tauri の capability は
mainウィンドウにだけ割り当て、IPC 権限は付与しない
- Tauri 2
- TypeScript 6
- Vite 8
- Rust 2021
- npm + Volta
フロントエンドは軽量化のため、React を使わず最小の Vite + TypeScript 構成にしています。
Windows と macOS(Apple Silicon / Intel)で開発・ビルドできます。
- Node.js
26.13.1 - npm
12.2.2 - Rust stable
Windows:
- WebView2 Runtime
- Microsoft C++ Build Tools
macOS:
- Xcode Command Line Tools(
xcode-select --install) - Apple Silicon では arm64 版の Node.js と Rust(
aarch64-apple-darwin)
package.json に Volta 設定があるため、Volta を使うと Node.js / npm の版を合わせやすくなります。
volta install node@26.13.1
volta install npm@12.2.2
rustup update stable
npm installバージョン確認:
node --version
npm --version
rustc --version
npm exec -- tauri --versionフロントエンドのみ起動:
npm run devTauri アプリとして起動:
npm run tauri:devnpm run build
npm run tauri:buildnpm run build と npm run typecheck は tsc -b を使うため、2 系統の TypeScript 設定をインクリメンタルにまとめて検査します。
主な生成先:
dist/src-tauri/target/release/src-tauri/target/release/bundle/
macOS 上で次を実行します。Apple Silicon では npm run tauri:dev で開発起動もできます。
rustup target add aarch64-apple-darwin
npm ci
npm run tauri:build:macos:arm64アプリは src-tauri/target/aarch64-apple-darwin/release/bundle/macos/、DMG は src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/ に生成されます。
macOS のバンドルには Tauri の ad-hoc 署名を設定しています。Apple による公証は行わないため、ダウンロードしたアプリの初回起動時に macOS の「プライバシーとセキュリティ」で実行の許可が必要になる場合があります。
npm run dev: Vite 開発サーバーnpm run build: TypeScript チェック + Vite 本番ビルドnpm run lint: ESLintnpm run typecheck: TypeScript 型チェックnpm run format: Prettier チェックnpm run format:write: Prettier 整形npm run tauri: Tauri CLInpm run tauri:dev: Tauri 開発起動npm run tauri:build: Tauri 本番ビルドnpm run tauri:build:macos:arm64: macOS Apple Silicon 向け本番ビルド(macOS 上で実行)
GitHub Actions の .github/workflows/tauri-action.yml で、release ブランチへの push または手動実行時にリリース用ビルドを作成します。
- macOS Apple Silicon(
aarch64-apple-darwin、Rosetta 不要) - macOS Intel(
x86_64-apple-darwin) - Ubuntu 24.04
- Windows
生成された成果物は GitHub Release の draft に添付されます。
Apple Silicon ではファイル名に aarch64 が含まれる DMG、Intel Mac では x64 が含まれる DMG を選んでください。
src-tauri/src/main.rs: WebView の起動とナビゲーション制御src-tauri/capabilities/main-window.json:mainウィンドウ向けの最小 capabilitysrc-tauri/tauri.conf.json: Tauri 設定package.json: Node.js / npm / スクリプト定義