Skip to content

Repository files navigation

Expo + Tauri Desktop App

A desktop application built with Expo (React Native for web, iOS, Android) and Tauri for building a native desktop app.

Quick Start

# Install dependencies
npm install

# Run as desktop app (starts Expo web + Tauri)
npm run tauri dev

# Build for production
npm run tauri build

Project Structure

  • src/ - Expo app (web, iOS, Android) with Expo Router file-based routing
  • src-tauri/ - Tauri backend (Rust)
  • dist/ - Expo web build output (used as Tauri frontend)

How It Works

Tauri uses the Expo web build as its frontend. This is configured in src-tauri/tauri.conf.json:

"build": {
  "beforeDevCommand": "pnpm start --web",
  "beforeBuildCommand": "npx expo export -p web",
  "devUrl": "http://localhost:8081",
  "frontendDist": "../dist"
}
  • Development: npm run tauri dev automatically starts the Expo web server and loads it in the Tauri window
  • Production: The build runs npx expo export -p web to generate static files in dist/

Web Output Configuration

Configure in app.json:

{
  "expo": {
    "web": {
      "output": "server", // "single", "server", or "static"
      "bundler": "metro"
    }
  }
}
Output Expo Router API Routes Use Case
single Yes No Simple SPA (default)
server Yes Yes API routes + custom server
static Yes No Static hosting

See Publishing Websites for more.

Commands

Command Description
npx expo start Run Expo in web/mobile dev mode
npm run tauri dev Run desktop app in development
npm run tauri build Build production desktop app
npm run reset-project Reset to fresh project state

Learn More

About

A desktop application built with Expo and Tauri - write once, deploy to web, iOS, Android, and desktop.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages