本文へスキップ
製品デスクトップツールTASTECAD図面の確認TASTEFILESファイル管理TASTEFTPファイル転送TASTESSHリモートワークスペースTASTEZIP圧縮と展開TASTEWINMファイル管理開発ツールTASTECODERust 統合開発環境TASTESTUDIO統合開発・テスト環境TASTEETLデータ統合(ETL)サーバーTASTEREMOTEリモートデスクトップサーバーTASTEGEO空間情報サーバーTASTEMAILメールワークスペース投資TASTESTOCK株式自動売買デスクトップアプリはじめるダウンロードドキュメント購入すべての製品
マーケットプレイス
ニュース
技術ニュース今日の開発ニュース開発ドキュメントプログラミング言語RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWebフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngularサーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Expressアプリ・デスクトップ フレームワークTauriFlutterReact NativeElectronアルゴリズムアルゴリズムの基礎主要アルゴリズム発展アルゴリズム実務のアルゴリズム
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケースコミュニティガイド
協業技術移転ウェブサイト構築デスクトップアプリ構築リリース・決済パイプライン販売パートナーお問い合わせ
サービスリモートデスクトップインストールパッケージのカスタマイズ
TASTEDEV
製品

デスクトップツール

TASTECAD複雑な図面を、軽やかにひらくTASTEFILES必要なファイルだけを、最速でTASTEFTPファイルが行き交う、いちばん端正な道TASTESSHサーバーとあなたを、より確かにつなぐTASTEZIPより速くまとめ、より安全にひらくTASTEWINM2つの画面で整理する、キーボード中心のファイルマネージャー

開発ツール

TASTECODERust アプリの編集・ビルド・デバッグ・テストまでひとつのウィンドウでTASTESTUDIO編集からリモートテスト、承認した AI 修正までTASTEETL値を見ながら、データを運ぶ

サーバー

TASTEREMOTE自社サーバーで運用するリモートデスクトップTASTEGEOGeoServer 互換の空間情報サーバーを Rust で作り直しますTASTEMAILメールの主導権を、もう一度自分の手に

投資

TASTESTOCKいつ・何を。自分で決めたルールどおりに動く株式自動売買

はじめる

ダウンロード全製品の最新版ドキュメント各製品の使い方購入サブスクリプション・永久ライセンスすべての製品全製品を一覧で
すべての製品
マーケットプレイスニュース
技術

ニュース

今日の開発ニュース言語・フレームワーク・GitHub・AI の公式発表開発ドキュメント言語・フレームワーク・アルゴリズムのガイド

プログラミング言語

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

フレームワーク

Webフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngular
サーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
アプリ・デスクトップ フレームワークTauriFlutterReact NativeElectron

アルゴリズム

アルゴリズムの基礎計算量解析 · ソート · 探索 · 基本データ構造 · 木構造とヒープ主要アルゴリズムグラフ探索 · 最短経路と最小全域木 · 動的計画法 · 貪欲法 · 分割統治法 · バックトラッキング発展アルゴリズム文字列アルゴリズム · 数学と整数論 · ビット演算 · セグメント木 · Union-Find実務のアルゴリズムコーディング面接対策 · LRUキャッシュ · レート制限 · コンシステントハッシュ法
開発ドキュメントをすべて見る
コミュニティ
プロジェクトビルダーと作品を探す開発ログ決定と試行錯誤プロンプト再利用できる指示AIツールの問題Claude・Codex・Gemini の問題と回避策ショーケース完成した成果コミュニティガイドオープンにつくる方法
協業
技術移転Rust・egui でネイティブアプリを作るウェブサイト構築10言語、アカウント、ドキュメントとダウンロードデスクトップアプリ構築Rust・egui、WebView なしリリース・決済パイプライン署名・MSI・deb・rpm・AppImage・ハッシュ販売パートナー紹介して決済額の30%お問い合わせ構築・提携・投資のご相談
サービス
リモートデスクトップブラウザから自分のパソコンへインストールパッケージのカスタマイズ必要な機能だけ、設定は事前に
購入
JA
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
ログイン
ログイン
TASTEDEV

小さなツールから、より良い開発へ。

support@tastedev.netTASTEDEVを支援
製品製品ラインナップ購入ドキュメントダウンロードマーケットプレイスサポート
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケース
ポリシー会社概要プライバシーポリシー利用規約サブスクリプション規約返金ポリシーコミュニティガイドライン
アカウントログイン新規登録
訪問者
今日
昨日
累計閲覧
商号
GXSOFT
代表者
CHOI YOUNG GU
事業者登録番号
853-44-00368
所在地
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
電話
+82-10-4404-1523
メール
whitecalvin@tastedev.net
個人情報保護責任者
CHOI YOUNG GU

© 2026 TASTEDEV製品情報は検証済みの開発ソースに基づいています。リリース・改善中

Tauri ドキュメント
Tauri
Getting Started with TauriProject StructureCore ConceptsData and StateTestingDeployment
ディスカッション

Tauri ガイド · 3/6

Core Concepts

この章は現在、英語でのみ提供しています。

This chapter explains how a Tauri app works: the relationship between the Rust core and the WebView, commands that let the frontend call Rust, events for two-way notifications, the permission-based security model, and plugins that add features.

A Rust core and the system WebView

A Tauri app consists of a core process written in Rust plus the WebViews that render the UI. Instead of bundling a browser engine, Tauri uses the one provided by the OS: WebView2 (based on Microsoft Edge) on Windows, WKWebView on macOS and iOS, WebKitGTK on Linux and the system WebView on Android. This keeps installers small, but since the rendering engine differs per platform, you should test the UI on every OS you ship to.

Windowing is handled by TAO and WebView integration by WRY, both maintained by the Tauri team. The core can reach windows, menus, the system tray and OS APIs, while code inside the WebView sends requests to the core over IPC (inter-process communication). Checking permissions at that boundary is the heart of Tauri's security.

Commands: calling Rust from the frontend

Annotate a Rust function with #[tauri::command] and register it with generate_handler!, and the frontend can call it by name. Call invoke_handler only once and list every command there; a second call replaces the first.

#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {name}!")
}

#[tauri::command]
fn divide(a: f64, b: f64) -> Result<f64, String> {
    if b == 0.0 {
        return Err("cannot divide by zero".into());
    }
    Ok(a / b)
}

#[tauri::command]
async fn count_lines(path: String) -> Result<usize, String> {
    let text = std::fs::read_to_string(&path).map_err(|e| e.to_string())?;
    Ok(text.lines().count())
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet, divide, count_lines])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Arguments and return values travel as JSON, so they must be serializable with serde. On the JavaScript side, pass arguments with camelCase keys; they are matched to the snake_case parameter names in Rust automatically. An Err value becomes a rejected Promise in the frontend. Commands without async run on the main thread, so make long-running work an async command to keep the UI responsive.

import { invoke } from "@tauri-apps/api/core";

const message = await invoke<string>("greet", { name: "Tauri" });

try {
  const result = await invoke<number>("divide", { a: 10, b: 0 });
  console.log(result);
} catch (error) {
  console.error(error); // "cannot divide by zero"
}

Events: notifications in both directions

Commands are request and response; events are fire-and-forget messages that either side can send. Use them when Rust needs to speak first, for progress updates or state changes. Rust emits through the trait, and the frontend subscribes with .

この章について質問がありますか?
前の章Project Structure次の章Data and State
Emitter
listen
use tauri::{AppHandle, Emitter};

#[tauri::command]
fn start_download(app: AppHandle) {
    std::thread::spawn(move || {
        for progress in [25, 50, 75, 100] {
            app.emit("download-progress", progress).unwrap();
            std::thread::sleep(std::time::Duration::from_millis(300));
        }
    });
}
import { listen } from "@tauri-apps/api/event";

const unlisten = await listen<number>("download-progress", (event) => {
  console.log(`Progress: ${event.payload}%`);
});
// Unsubscribe when the view goes away
unlisten();

Use emit_to to target a specific window. For streaming large amounts of ordered data, accept a tauri::ipc::Channel as a command argument; channels are faster than events.

The security model: capabilities and permissions

Tauri 2 denies WebView access to privileged features by default and lets you allow only what you need in capability files.

  • Permission: allows or denies one or more commands, for example fs:allow-read-text-file.
  • Scope: limits what a command may touch, such as file paths or URLs.
  • Capability: a file that grants a set of permissions to specific windows or webviews.
{
  "identifier": "main-capability",
  "windows": ["main"],
  "permissions": [
    "core:default",
    "dialog:allow-open",
    {
      "identifier": "fs:allow-read-text-file",
      "allow": [{ "path": "$APPDATA/**" }]
    }
  ]
}

Commands registered by your own app are callable from all windows by default; if you need finer control, you can define permissions for them through an app manifest. On top of that, set a Content Security Policy in app.security.csp to stop untrusted scripts from running.

Plugins

File system access, dialogs, HTTP, notifications, the shell, key-value storage and more are provided as plugins. Add official plugins with the CLI: it installs the Rust crate and the JavaScript package and registers the plugin in lib.rs. Afterwards, check that the permissions you need are in your capability file.

npm run tauri add dialog
import { open } from "@tauri-apps/plugin-dialog";

const path = await open({
  multiple: false,
  filters: [{ name: "Text", extensions: ["txt", "md"] }],
});

Summary

  • Tauri builds apps from a Rust core and the operating system's WebView, connected by IPC.
  • #[tauri::command] plus invoke lets the frontend call Rust; events carry notifications both ways.
  • Capabilities, permissions and scopes grant each window only the features it needs.
  • OS features come from official plugins added with tauri add.

コメント 0件

人気のコメント順新しい順

ログイン · ログインするとコメントできます。