Vai al contenuto principale
ProdottiStrumenti desktopTASTECADVisualizzazione disegniTASTEFILESGestione fileTASTEFTPTrasferimento fileTASTESSHSpazio di lavoro remotoTASTEZIPCompressione ed estrazioneTASTEWINMGestione fileStrumenti per sviluppatoriTASTECODEAmbiente di sviluppo integrato per RustTASTESTUDIOAmbiente integrato di sviluppo e testTASTEETLIntegrazione dati (ETL)ServerTASTEREMOTEServer di desktop remotoTASTEGEOServer geospazialeTASTEMAILSpazio di lavoro emailInvestimentiTASTESTOCKApp desktop di trading automatico azionarioIniziaDownloadDocumentazioneAcquistaTutti i prodotti
Marketplace
Notizie
TecnologiaNotizieNotizie di sviluppo di oggiDocumentazioneLinguaggi di programmazioneRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFramework frontend webNext.jsReactVue.js · NuxtSvelteKitAngularFramework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFramework per app e desktopTauriFlutterReact NativeElectronAlgoritmiBasi degli algoritmiAlgoritmi fondamentaliAlgoritmi avanzatiAlgoritmi pratici
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrinaGuida alla community
CollaboraTrasferimento tecnicoRealizzazione del sito webRealizzazione di app desktopPipeline di rilascio e pagamentoPartner commercialeContatti
ServiziDesktop remotoPacchetti di installazione su misura
TASTEDEV
Prodotti

Strumenti desktop

TASTECADApri con leggerezza anche i disegni più complessiTASTEFILESSolo i file che servono, alla massima velocitàTASTEFTPLa via più ordinata per i tuoi fileTASTESSHUn legame più solido tra te e i tuoi serverTASTEZIPComprimi più veloce, estrai più sicuroTASTEWINMUn file manager a due pannelli pensato per la tastiera

Strumenti per sviluppatori

TASTECODEModifica, compila, esegui il debug e testa app Rust in un'unica finestraTASTESTUDIODalla modifica ai test remoti e alle correzioni IA approvateTASTEETLSposta i dati guardando i valori

Server

TASTEREMOTEUn desktop remoto che gira sul tuo serverTASTEGEOUn server geospaziale compatibile con GeoServer, ricostruito in RustTASTEMAILRiprendi il controllo della tua posta

Investimenti

TASTESTOCKTrading automatico azionario secondo le regole che decidi tu: quando e che cosa

Inizia

DownloadUltime versioni di ogni prodottoDocsCome usare ogni prodottoAcquistaAbbonamenti e licenze perpetueTutti i prodottiTutti i prodotti a colpo d’occhio
Tutti i prodotti
MarketplaceNotizie
Tecnologia

Notizie

Notizie di sviluppo di oggiAnnunci ufficiali su linguaggi, framework, GitHub e IADocumentazioneGuide a linguaggi, framework e algoritmi

Linguaggi di programmazione

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Framework

Framework frontend webNext.jsReactVue.js · NuxtSvelteKitAngular
Framework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Framework per app e desktopTauriFlutterReact NativeElectron

Algoritmi

Basi degli algoritmiAnalisi della complessità · Ordinamento · Ricerca · Strutture dati di base · Alberi e heapAlgoritmi fondamentaliVisita dei grafi · Cammini minimi e alberi ricoprenti · Programmazione dinamica · Algoritmi greedy · Divide et impera · BacktrackingAlgoritmi avanzatiAlgoritmi sulle stringhe · Matematica e teoria dei numeri · Manipolazione dei bit · Alberi di segmenti · Union-FindAlgoritmi praticiStrategia per colloqui di programmazione · Cache LRU · Rate limiting · Hashing consistente
Tutta la documentazione di sviluppo
Community
ProgettiScopri sviluppatori e lavoriLog di sviluppoDecisioni e lezioni appresePromptIstruzioni riutilizzabiliProblemi degli strumenti di IAProblemi e alternative di Claude, Codex, GeminiVetrinaRisultati completatiGuida alla communityCome sviluppiamo in modo aperto
Collabora
Trasferimento tecnicoApp native in Rust ed eguiRealizzazione del sito web10 lingue, account, documentazione e downloadRealizzazione di app desktopRust ed egui, senza WebViewPipeline di rilascio e pagamentoFirma, MSI, deb, rpm, AppImage, hashPartner commercialeConsigliaci e ricevi il 30%ContattiSviluppo, partnership e investimenti
Servizi
Desktop remotoRaggiungi il tuo computer dal browserPacchetti di installazione su misuraSolo il necessario, impostazioni precaricate
Acquista
IT
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Accedi
Accedi
TASTEDEV

Dai piccoli strumenti a uno sviluppo migliore.

support@tastedev.netSostieni TASTEDEV
ProdottiGamma di prodottiAcquistaDocsDownloadMarketplaceAssistenza
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrina
NormeChi siamoInformativa sulla privacyTermini di servizioCondizioni di abbonamentoRimborsiLinee guida della community
AccountAccediRegistrati
Visitatori
Oggi
Ieri
Visualizzazioni totali
Società
GXSOFT
Rappresentante
CHOI YOUNG GU
Numero di registrazione
853-44-00368
Indirizzo
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefono
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsabile privacy
CHOI YOUNG GU

© 2026 TASTEDEVLe informazioni sui prodotti si basano su fonti di sviluppo verificate.Rilasciato · in miglioramento

Documentazione di Tauri
Tauri
Getting Started with TauriProject StructureCore ConceptsData and StateTestingDeployment
Discussioni

Guida a Tauri · 3/6

Core Concepts

Per ora questo capitolo è disponibile solo in inglese.

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 .

Domande su questo capitolo?
Capitolo precedenteProject StructureCapitolo successivoData 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 commenti

Commenti principaliPrima i più recenti

Accedi · Accedi per lasciare un commento.