Skip to content

A basic template for developing a Tauri app using React, Typescript and Tailwind.

Notifications You must be signed in to change notification settings

emrecancorapci/tauri-react-typescript-tailwind

Repository files navigation

Tauri + React + TypeScript + Vite + Tailwind

This template provides a setup to get React running on Vite and Tauri. Tailwind is installed in the project and includes some ESLint rules to help in the development process.

Getting Started

Prerequisites

For Windows:

  • Install Microsoft Visual Studio C++ Build Tools from here. Select C++ build tools and Windows 10 SDK in the installer.
  • Download and run the Evergreen Bootstrapper from here.
  • Install Rust with rustup from here.
  • Install Node.js from here.
  • Install pnpm from here. (Optional)

For Linux(Debian/Ubuntu):

  • Run the following commands in your terminal:

    sudo apt update
    sudo apt install libwebkit2gtk-4.0-dev \
       build-essential \
       curl \
       wget \
       file \
       libssl-dev \
       libgtk-3-dev \
       libayatana-appindicator3-dev \
       librsvg2-dev
  • To install Rust on Linux, open a terminal and enter the following command:

    curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

For MacOS:

  • To install Rust on macOS, open a terminal and enter the following command:

    curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

To find more detailed information about prerequisites check docs.

Installation

  1. Clone the repo to your local machine using a terminal
    git clone https://github.com/emrecancorapci/tauri-react-typescript-tailwind
  2. Change directory
    cd tauri-react-typescript-tailwind
  3. Install NPM packages
    pnpm install

Usage

Development

To start the development server using Tauri, run the following command:

pnpm dev:tauri

You can start the development server without using Tauri. To do this, run the following command:

pnpm dev

Build

To build the project, you must change the bundle identifier in tauri.conf.json > tauri > bundle > identifier. The default value com.tauri.dev is not allowed as it must be unique across applications.

To build the project, run the following command:

pnpm build:tauri

For more details about build, check docs.

About

A basic template for developing a Tauri app using React, Typescript and Tailwind.

Topics

Resources

Stars

Watchers

Forks