HTML/CSS/JS

Prerequisites

We expect you to have a working development environment from here on out. Please see the Prerequisites page if you haven't done this yet.

The Tauri CLI

The Tauri CLI is the magic glue, that makes it all work: It orchestrates your frontend development server and cargo during development and bundles the rust binary and associated resources (sidecars or icons) into the final distributable app. You can install it from various sources, depending on your preference:

Cargo

The CLI is written in Rust, so its primary distribution mechanism is cargo:

cargo install tauri-cli

Please note that cargo has no support for prebuilt binaries, so the above command will always build the CLI from source.

JavaScript Package Managers

If you don't want to build the CLI from source or want to lock and version it for reproducible builds, we also distribute the CLI as an NPM package: @tauri-apps/cli.

npm

npm install --save-dev @tauri-apps/cli

yarn

yarn add -D @tauri-apps/cli

pnpm

pnpm add -D @tauri-apps/cli

Scaffold the Project

The easiest way to scaffold a Tauri app is create-tauri-app

npm

npx create-tauri-app

yarn

yarn create tauri-app

pnpm

pnpm create tauri-app

Just follow the prompts and select the Vanilla.js recipe!

Create the Frontend

Open a Window

Invoke Commands

Recap