Released · improving
Framework · Since 2022
Tauri is a framework for building small, secure desktop and mobile apps from a Rust core and the system WebView, with the UI written in web technologies.
Tauri is an open-source framework that combines a user interface built with HTML, CSS and JavaScript with a core written in Rust to produce apps for Windows, macOS, Linux, Android and iOS. Its first stable release arrived in 2022, and it now supports desktop and mobile alike. Instead of bundling a browser engine, Tauri uses the WebView that ships with the operating system (WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux and so on), which keeps installers small and memory use modest.
Tauri fits well when you want to reuse web development skills for a desktop app but care about size and security. Any frontend that builds to static files works, including React, Vue, Svelte and Angular, while OS-level work such as file system access or the system tray is handled by Rust commands and official plugins. Code inside the WebView can only use features that capabilities and permissions explicitly grant to its window, so apps naturally end up exposing only what they need.
To get started, install Rust and your platform's WebView development libraries, scaffold a project with create-tauri-app and run it in development mode. You do not need deep Rust knowledge to begin; tweaking the template's greet command is a good first step. The official documentation then walks through commands, events, the security model and distribution, and the guide below follows the same path.
Tauri relies on the system WebView instead of bundling a browser engine, keeping installers and memory use small.
Windowing, file access and heavy computation run in Rust, giving you a fast, memory-safe backend.
Capabilities, permissions and scopes decide which commands and paths each window may use; everything else is denied by default.
One codebase can target Windows, macOS and Linux desktops as well as Android and iOS.
Install Rust with rustup. Windows also needs the Microsoft C++ Build Tools and WebView2, macOS needs the Xcode Command Line Tools, and Linux needs development libraries such as WebKitGTK. Install Node.js if you use a web frontend.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcreate-tauri-app asks for a project name, identifier, frontend language, package manager and UI template, then generates the project.
npm create tauri-app@latestInstall dependencies and start the app in development mode. The first run takes a few minutes to build the Rust dependencies; after that, frontend changes show up immediately.
cd tauri-app && npm install && npm run tauri devsrc-tauri/src/lib.rs holds the app's Rust core. The greet function, marked with #[tauri::command], is a command the frontend can call with invoke("greet", { name }), and it is registered through generate_handler!. The run function assembles and starts the app; on desktop, main.rs calls it. Run npm run tauri dev and the app window opens.
src-tauri/src/lib.rs
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {name}! You've been greeted from Rust!")
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
npm run tauri devSix chapters that take you from installation to the core ideas of Tauri.
Ask questions, share experience and trade opinions about Tauri.
No discussions yet. Start the first one.
0 comments
Sign in · Sign in to leave a comment.
Be the first to comment.