Create a react application using cra(create-react-app) and then include a tauri(Change cra to tauri app).
- Install webview2(on windows), rust and node
- Install package manager cargo and yarn
Create a normal cra with ts template.
yarn create react-app <app name> --template typescript
yarn install @tauri-apps/cli
yarn install -D @tauri-apps/api
You can select all options as default.
yarn tauri init
Startup react before running tauri, and build react before build tauri application.
yarn startor other command to start react dev server.
yarn.buildor other command to build react to distdir.
Set scripts to start tauri in react app.
Open package.json and add scripts.
yarn tauri dev
Rust will build your package which defined in
It will download dependencies using cargo first time, take a rest. Set another cargo registry may quickly.