Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 39 ยท Getting Started

What Is Tauri?

Learn what Tauri is, how a Rust core and a system webview combine into small desktop and mobile apps, and when Tauri is a good choice for your project.

Tauri is a framework for building desktop and mobile applications with a web frontend and a Rust backend. You write the user interface with HTML, CSS and JavaScript (or any framework that produces them), and you write the parts that need the operating system in Rust. Tauri packages both into one native application that your users install like any other program.

The big idea is simple: do not ship a browser with every app. Every modern operating system already contains a web rendering engine. Tauri uses that engine to draw your interface, so your installer stays small and your memory use stays low.

This tutorial teaches Tauri 2, the current major version. It also runs on Android and iOS, not only on Windows, macOS and Linux. The real Tauri toolchain (Rust, a compiler, a native window) cannot run inside this page, so the Rust code you see is read-only and the live examples are small JavaScript stand-ins that model the same ideas. Each stand-in is labelled.

The two halves of a Tauri app

A Tauri application has two cooperating parts:

  1. The frontend. Ordinary web code, shown in a webview: a window that renders web content. It can be plain HTML, or React, Vue, Svelte, Angular, Solid, or anything else.
  2. The core. A Rust program. It creates the windows, owns the application's lifetime, reads files, talks to the network or the operating system, and exposes functions to the frontend.

The two halves talk through a message channel called IPC (inter-process communication). The frontend asks the core to do something, the core answers with data.

flowchart LR
  U["User"] --> W["Webview<br/>HTML, CSS, JS"]
  W -- "invoke('command', args)" --> C["Rust core<br/>commands, state, plugins"]
  C -- "JSON result or error" --> W
  C --> OS["Operating system<br/>files, windows, tray"]

The webview draws the interface; the Rust core touches the operating system.

Why people choose Tauri

Why Tauri?

Small apps No bundled browser
Rust core Fast and memory safe
Any frontend Use the web tools you know
Secure by default Permissions are explicit

Four reasons teams pick Tauri over a bundled-browser framework.

1 / 2
  • Size. A minimal Tauri app can be a few megabytes, because the browser engine is the one already on the computer.
  • Speed and memory. The Rust core compiles to native code. There is no second JavaScript runtime running your backend.
  • Freedom in the frontend. Tauri does not care how the HTML gets made. Anything that outputs static files works.
  • Security model. The frontend is untrusted by default. It can only call the commands you expose, and only if you grant it permission. You will study this in detail later.

What Tauri is not

Tauri is not a web server and not a cloud service. Your app runs on the user's machine and does not need a network connection unless you add one. It is also not a way to run Rust in the browser: the Rust runs natively, outside the webview.

It is also worth knowing the trade-off: because each operating system uses a different web engine (WebView2 on Windows, WKWebView on macOS and iOS, WebKitGTK on Linux), a very new browser feature may behave differently across platforms. You test on each target, as you would for different browsers.

Try it: the IPC idea in miniature

The next example is a stand-in written in JavaScript. It is not Tauri code. It models how a frontend asks a core for work by sending a plain message and getting a plain result back.

Node.js Stand-in: a tiny frontend and core talking over messages

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Notice that the frontend never calls core.greet directly. It names a command and passes data. That boundary is the heart of Tauri's design.

Try it: how small is small?

Here is a second stand-in that compares, with made-up but typical numbers, what two approaches ship to a user. The numbers are illustrative, not measurements.

Node.js Stand-in: what an installer contains

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

The shape matters more than the numbers: the browser part disappears because it already lives in the operating system.

Where Tauri fits

Good fits: developer tools, note-taking and editing apps, dashboards, media utilities, internal business tools, apps that wrap an existing web product with native extras like a tray icon or file access.

Weaker fits: apps that must render pixel-identical output on every platform and depend on a cutting-edge browser feature, or apps whose team has no one willing to learn a little Rust. Even then, many apps need only a handful of Rust functions, and you will see how small that can be in Commands basics.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does a Tauri app use to display its user interface?

    Tauri renders the frontend in the system webview (WebView2, WKWebView or WebKitGTK), which is why installers stay small.
  2. 2. What is the role of the Rust core?

    The core owns the application lifecycle and native capabilities. The frontend only draws the interface and asks the core for work.
  3. 3. How do the frontend and the core communicate?

    They run in separate contexts and exchange serialized messages, for example with invoke.
  4. 4. Which is a real trade-off of using system webviews?

    Each operating system ships a different engine, so you test on every platform you target.

Summary

  • Tauri builds desktop and mobile apps from a web frontend plus a Rust core.
  • The frontend lives in the operating system's webview, so apps are small and light.
  • Frontend and core exchange serialized messages; the frontend is untrusted by default.
  • Different platforms use different webview engines, so test on each target.
  • The live examples in this tutorial are labelled JavaScript stand-ins; the Rust is read-only.

Next: Tauri vs Electron and other options