MDX Limo
Untitled

Here’s the simplest way to think about a Tauri v2 app that targets desktop and mobile:

Tauri is one app project with shared code, plus platform-specific wrappers. Your frontend lives at the project root, your Rust app lives in src-tauri/, and mobile adds generated Android/iOS native project folders inside the same repo. It’s not a separate app repo, but it also isn’t “just a mobile view” of the desktop app. You ship real desktop and mobile binaries. Sources: Project Structure, CLI Reference

What You Build

One shared frontend, usually React/Vue/Svelte/etc. One shared Rust core in src-tauri/ Desktop targets using tauri dev and tauri build Android targets using tauri android init, tauri android dev, tauri android build iOS targets using tauri ios init, tauri ios dev, tauri ios build Sources: CLI Reference Project Layout

my-app/ ├── src/ # frontend app ├── package.json ├── src-tauri/ │ ├── src/ │ │ ├── lib.rs # shared app entry point │ │ └── main.rs # desktop entry point │ ├── tauri.conf.json │ ├── capabilities/ │ └── build.rs └── generated mobile folders after init Tauri’s docs recommend putting shared app startup in src-tauri/src/lib.rs. On mobile, that shared function is marked with #[cfg_attr(mobile, tauri::mobile_entry_point)], while desktop uses main.rs to call into the same shared run() function. Source: Project Structure

What You Need Installed

Rust Tauri prerequisites for your desktop OS Android tooling if you want Android builds Xcode and macOS if you want iOS builds Important: iOS commands only work on macOS hosts. Sources: Prerequisites, iOS CLI

How Development Works For desktop:

pnpm tauri dev pnpm tauri build For mobile:

pnpm tauri android init pnpm tauri ios init

pnpm tauri android dev pnpm tauri android build

pnpm tauri ios dev pnpm tauri ios build Desktop and mobile both use your Tauri config:

build.beforeDevCommand starts the frontend dev server build.devUrl points to that dev server build.beforeBuildCommand builds the frontend build.frontendDist points to the built frontend files Sources: tauri dev, tauri build, Configuration Files What Stays Shared

Most frontend components Most Rust commands/business logic Shared design system Shared state/data models What Usually Changes For Mobile

Navigation patterns Touch-friendly layouts Permissions Camera/files/location flows Safe-area handling Mobile-specific native integrations Best Mental Model Use one codebase, not one identical UI. Build shared logic once, then adapt the UX where mobile actually needs to feel mobile.

Good Starting Path

Build the desktop app first. Move shared Rust setup into src-tauri/src/lib.rs. Add mobile support with tauri android init and tauri ios init. Keep core logic shared. Make the UI responsive, then add mobile-specific screens where needed. If you want, I can turn this into a repo-ready README section or a “Tauri v2 with React/Vite” version next.

Untitled Document | MDX Limo