/tauri-app-template

A template for building desktop applications with Tauri

Primary LanguageJavaScriptMIT LicenseMIT

Tauri App Template

This is a template for building desktop applications with Tauri.

Requirements

Get Started

Create a new project using this template

Click the Use this template button.

Features

Tauri

  • This template uses the latest versions of Tauri features.
  • Build smaller, faster, and more secure desktop applications with a web frontend

Vite

  • Vite is used to group all the source code of the renderer.
  • Work easily with Vue, Svelte, React, etc.

Typescript (optional)

  • The Latest TypeScript is used for all source code.
  • Vite supports TypeScript out of the box. However, it does not support type checking.

Note: If you do not need a TypeScript, you can easily abandon it. To do this, You do not need to make any bundler configuration changes, etc. Just replace all .ts files with .js files. Additionally, it will be useful to delete TS-specific files, plug-ins and dependencies like tsconfig.json, @typescript-eslint/*, etc.

Web frameworks

By default this template is configured with vanilla-ts.

See examples of different frameworks.

How it works

The template required a minimum dependencies. Only Tauri and Vite is used for building, nothing more.

Project Structure

The structure of this template is very similar to the structure of a monorepo.

Start Development

yarn dev

The first time you run this command, it will take several minutes for the Rust package manager to download and build all the required packages. Since they are cached, subsequent builds will be much faster, as only your code will need rebuilding.

Once Rust has finished building, the webview will open and it should display your web app.

App Publishing

yarn build

This command will embed your web assets into a single binary with your Rust code. The binary itself will be located in packages/src-tauri/target/release/[app name], and installers will be located in packages/src-tauri/target/release/bundle/.

Like the yarn dev command, the first time you run this, it will take some time to collect the Rust crates and build everything - but on subsequent runs it will only need to rebuild your code, which is much quicker.

License

This project is licensed under the MIT License - see LICENSE for more information.

Copyright (c) 2021 Valmisson Grizorte.