Build Commands
Development Build
For testing without optimizations:Production Build
For release distribution with full optimizations:- Runs
pnpm buildto compile the React frontend with Vite - Compiles TypeScript to optimized JavaScript
- Builds the Rust backend in release mode with optimizations
- Creates platform-specific bundles (
.appand.dmg) - Signs the app if signing identity is configured
The first production build may take 5-10 minutes as Rust compiles all dependencies with optimizations enabled.
Build Configuration
Tauri Configuration
File:src-tauri/tauri.conf.json
- targets: Creates both
.appbundle and.dmginstaller - minimumSystemVersion: Requires macOS 12.0 (Monterey) or later
- signingIdentity: Apple Developer ID for code signing
- category: App Store category for proper integration
Package Scripts
File:package.json
Build Output
Output Location
After runningpnpm tauri build, compiled artifacts are located at:
Bundle Contents
The.app bundle contains:
- MacOS/ZipDrop - Compiled Rust binary
- Resources/ - Frontend assets (HTML, CSS, JS)
- Info.plist - App metadata and capabilities
- Icons.icns - App icon in multiple resolutions
- _CodeSignature/ - Code signing data (if signed)
File Sizes
Typical build sizes:- App bundle: ~8-12 MB (compressed)
- DMG installer: ~10-15 MB
- Uncompressed: ~20-30 MB
Tauri apps are significantly smaller than Electron equivalents because they use the system webview instead of bundling Chromium.
Code Signing
Prerequisites
To distribute outside the App Store, you need:Apple Developer Account
Sign up at developer.apple.com ($99/year)
Developer ID Certificate
Create a Developer ID Application certificate in Xcode or the developer portal
Automatic Signing
Tauri will automatically sign the app if:- A valid
signingIdentityis set intauri.conf.json - The certificate is installed in your Keychain
Manual Signing
If automatic signing fails, sign manually:Notarization
For Gatekeeper approval, notarize the app with Apple:Create App-Specific Password
Generate at appleid.apple.com
Distribution
Direct Distribution
For small-scale distribution:- Upload DMG to your website or file hosting
- Share the link with users
- Users download and drag to Applications folder
GitHub Releases
For open-source distribution:Homebrew Cask
For easy installation viabrew install --cask zipdrop:
- Create a cask formula
- Submit PR to homebrew-cask
- After merge, users can install with:
Build Optimization
Rust Optimization
For smaller binaries, add toCargo.toml:
Frontend Optimization
Vite automatically:- Minifies JavaScript and CSS
- Tree-shakes unused code
- Chunks code for optimal loading
- Compresses assets
Troubleshooting
Build Fails: “xcrun: error”
Solution: Install Xcode Command Line ToolsBuild Fails: “No signing identity found”
Solution: Either:- Remove
signingIdentityfromtauri.conf.jsonfor unsigned builds - Install a valid Developer ID certificate
DMG Not Created
Solution: Check that"dmg" is in the targets array:
Large Binary Size
Solution: Ensure you’re building in release mode (not--debug) and apply Rust optimization flags above.
CI/CD Integration
GitHub Actions Example
Next Steps
Getting Started
Return to development setup
Architecture
Understand the codebase structure