new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Tauri · all subjects

building/setup

196 notes in this subject, read out of this brain and free to use. This is page 1 of 4.

Create Tauri app with Fish

To create a new Tauri app using Fish shell, run: sh (curl -sSL https://create.tauri.app/sh | psub)

Create Tauri app with bun

To create a new Tauri app using Bun, run: bun create tauri-app

Create Tauri app with bash

To create a new Tauri app using bash, run: sh <(curl https://create.tauri.app/sh)

Create Tauri app with pnpm

To create a new Tauri app using pnpm, run: pnpm create tauri-app

Create Tauri app with PowerShell

To create a new Tauri app using PowerShell, run: irm https://create.tauri.app/ps | iex

Create Tauri app with Cargo

To create a new Tauri app using Cargo, first install the tool with cargo install create-tauri-app --locked, then run cargo create-tauri-app

Create Tauri app with deno

To create a new Tauri app using Deno, run: deno run -A npm:create-tauri-app

Create Tauri app with Yarn

To create a new Tauri app using Yarn, run: yarn create tauri-app

Tauri compatible with FLOSS and GNU/Linux distributions

Tauri applications can be built as certifiably open source software compliant with FLOSS principles and can be included in FSF endorsed GNU/Linux distributions.

Create keystore.properties file

Create a file at [project]/src-tauri/gen/android/keystore.properties containing: password=<password from keytool>, keyAlias=upload, and storeFile=<path to upload-keystore.jks file>.

keytool location in Android Studio

If keytool is not in your PATH, it may be found in the JDK installed with Android Studio at: /opt/android-studio/jbr/bin/keytool on Linux (path depends on distribution), /Applications/Android\ Studio.app/Contents/jbr/Contents/Home/bin/keytool on macOS, or C:\Program Files\Android\Android Studio\jbr\bin\keytool.exe on Windows.

GitHub Actions Android signing setup example

To set up Android signing in GitHub Actions, create a keystore.properties file in src-tauri/gen/android with the keyAlias, password, and storeFile values sourced from GitHub Secrets. The keystore.jks can be stored as a base64-encoded secret, decoded during the build, and its temporary path added to keystore.properties. Example step: - name: setup Android signing run: | cd src-tauri/gen/android echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > keystore.properties echo "password=${{ secrets.ANDROID_KEY_PASSWORD }}" >> keystore.properties base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties

Keystore file security

The keystore file must be kept private and should not be checked into public source control.

Correct build.gradle.kts file location for signing

When configuring Gradle signing, edit the build.gradle.kts file in the app/ directory relative to the keystore.properties file location, not other build.gradle.kts files in the project. The correct file contains a buildTypes block.

Gradle release signingConfig configuration

In the buildTypes block of [project]/src-tauri/gen/android/app/build.gradle.kts, configure the release build type to use the signing config by setting: buildTypes { getByName("release") { signingConfig = signingConfigs.getByName("release") } }

Generate Java Keystore with keytool

Android signing requires a Java Keystore file generated using the keytool CLI. On macOS/Linux, use: keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload. On Windows, use: keytool -genkey -v -keystore $env:USERPROFILE\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload.

keystore.properties file security

The keystore.properties file must be kept private and should not be checked into public source control.

Google Play App Signing mechanism

Google provides an additional signing mechanism for Android App Bundles distributed in the Play Store.

Android app signing requirement

To publish on the Play Store, Android App Bundles and APKs must be signed with a digital certificate before being uploaded for distribution.

Gradle signingConfigs release configuration

Configure Gradle to use the signing key by editing [project]/src-tauri/gen/android/app/build.gradle.kts. Add import java.io.FileInputStream at the top, then add a signingConfigs block before buildTypes with a "release" configuration that reads keystore.properties and loads keystoreProperties, setting keyAlias, keyPassword, storeFile, and storePassword from the properties object.

ARM build configuration for different architectures

For aarch64 architecture: use cpu cortex-a72, DietPi_RPi5-ARMv8-Bookworm base image, deb target arm64, rpm target aarch64, appimage target aarch64. For armv7l architecture: use cpu cortex-a53, DietPi_RPi-ARMv7-Bookworm base image, deb target armhfp, rpm target arm, appimage target armhf.

ARM runner emulation for Linux Arm AppImages

The pguyot/arm-runner-action can be used to compile for ARM architectures on emulated runners. This bridges the gap for missing cross-architecture build support in the AppImage tooling. However, arm-runner-action is much slower than GitHub's standard runners, so be careful with build minute costs in private repositories. An uncached build for a fresh create-tauri-app project needs approximately 1 hour.

Code signing configuration for GitHub Actions

To set up code signing for Windows and macOS in GitHub Actions workflows, follow platform-specific guides. For macOS apps built without an Apple signing certificate, configure an ad-hoc signing identity to prevent macOS from treating Apple Silicon builds downloaded from GitHub releases as damaged.

GitHub Token permissions for Tauri workflows

The GitHub Token is automatically issued by GitHub for each workflow run and is passed via env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}. By default, it only has read permissions. If you get a 'Resource not accessible by integration' error, you need to add write permissions by going to GitHub project settings, selecting Actions, scrolling down to Workflow permissions, and checking 'Read and write permissions'.

Example GitHub Actions workflow for Tauri multi-platform builds

name: 'publish' on: workflow_dispatch: push: branches: - release jobs: publish-tauri: permissions: contents: write strategy: fail-fast: false matrix: include: - platform: 'macos-latest' args: '--target aarch64-apple-darwin' - platform: 'macos-latest' args: '--target x86_64-apple-darwin' - platform: 'ubuntu-22.04' args: '' - platform: 'ubuntu-22.04-arm' args: '' - platform: 'windows-latest' args: '' runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v7 - name: install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils - name: setup node uses: actions/setup-node@v6 with: node-version: lts/* cache: 'npm' - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: Rust cache uses: swatinem/rust-cache@v2 with: workspaces: './src-tauri -> target' - name: install frontend dependencies run: npm install - uses: tauri-apps/tauri-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tagName: app-v__VERSION__ releaseName: 'App v__VERSION__' releaseBody: 'See the assets to download this version and install.' releaseDraft: true prerelease: false args: ${{ matrix.args }} This workflow builds and releases Tauri apps for Windows x64, Linux x64, Linux Arm64, macOS x64 and macOS Arm64 (M1 and above). The tauri-action automatically replaces __VERSION__ with the app version.

GitHub Actions workflow triggering options

Release workflows can be triggered by pushing to the release branch using on: push: branches: - release. Alternatively, workflows can be triggered by pushing a version git tag such as app-v0.7.0 using on: push: tags: - 'app-v*'. The tauri-action automatically creates a git tag and GitHub release title using the application version.

GitHub Arm64 runners availability

As of August 2025, GitHub has released publicly available ubuntu-22.04-arm and ubuntu-24.04-arm runners that can be used to build Tauri apps for Arm64 in public repositories without needing emulation.

Ubuntu system dependencies for Tauri builds

Ubuntu builds require these system dependencies: libwebkit2gtk-4.1-dev, libappindicator3-dev, librsvg2-dev, patchelf, and xdg-utils. These should be installed with: sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils

tauri-action configuration with projectPath

When your app is not on the root of the repository, use the projectPath input parameter in tauri-action to specify the correct project directory.

Tauri updater GitHub release integration

Tauri's updater can be configured to query newly created GitHub releases for updates. The release workflow handles this by creating releases with appropriate metadata that the updater can read.

tauri-action GitHub Actions integration

The tauri-action is a GitHub Actions tool that easily builds and uploads Tauri apps. It can automatically initialize Tauri for projects that do not have it configured yet. It is used by adding tauri-apps/tauri-action@v1 to a GitHub Actions workflow.

macOS build system requirement

Building and packaging Tauri apps for macOS and iOS requires running on a macOS machine.

tauri icon command for iOS

Update app icons for iOS using the tauri icon command: tauri icon /path/to/app-icon.png --ios-color '#fff'. The --ios-color argument defines the background color for the iOS icons.

App Store separate configuration file for CI/CD

Create a separate tauri.appstore.conf.json file to apply App Store-specific configurations only when building for App Store submission. This file can be merged with the main configuration during CI/CD builds without requiring provision profiles locally.

App Store Connect API key authentication

To create an App Store Connect API key, open App Store Connect's Users and Access page, select Integrations > Individual Keys tab, click Add, and select Developer access. The APPLE_API_ISSUER (Issuer ID) is displayed above the keys table. The APPLE_API_KEY_ID is the Key ID column value. Download the private key file and save it as AuthKey_<APPLE_API_KEY_ID>.p8 in one of these directories: <current-working-directory>/private_keys, ~/private_keys, ~/.private_keys, or ~/.appstoreconnect/private_keys.

iOS App Store upload with altool

Upload an iOS app IPA to the App Store using: xcrun altool --upload-app --type ios --file "src-tauri/gen/apple/build/arm64/$APPNAME.ipa" --apiKey $APPLE_API_KEY_ID --apiIssuer $APPLE_API_ISSUER. The app requires an App Store Connect API key for authentication.

macOS App Store encryption compliance

Apps must comply with encryption export regulations. Create an Info.plist file in src-tauri with ITSAppUsesNonExemptEncryption set to false if the app does not use encryption, or true if it does.

iOS build for App Store

Build an iOS app for App Store distribution using: tauri ios build --export-method app-store-connect. The generated IPA file is located at src-tauri/gen/apple/build/arm64/$APPNAME.ipa.

App Sandbox must be tested

After setting up App Sandbox entitlements for App Store distribution, verify that the app works correctly when running in an App Sandbox context.

macOS App Store upload with altool

Upload a macOS app PKG to the App Store using: xcrun altool --upload-app --type macos --file "$APPNAME.pkg" --apiKey $APPLE_API_KEY_ID --apiIssuer $APPLE_API_ISSUER. The app requires an App Store Connect API key for authentication.

macOS App Store Apple Silicon-only build

To support only Apple Silicon instead of universal architecture, set tauri.conf.json > bundle > macOS > minimumSystemVersion to '12.0' and run the build command without --target universal-apple-darwin. On Apple Silicon build systems, use target/release. On Intel build systems, install the Rust aarch64-apple-darwin target and change the universal-apple-darwin argument to aarch64-apple-darwin.

macOS App Store build for universal architecture

Run 'tauri build --bundles app --target universal-apple-darwin' to package the app as a macOS App Bundle supporting both Apple Silicon and Intel processors.

macOS App Store requires category configuration

Apps distributed to the App Store must define tauri.conf.json > bundle > category to be displayed in the App Store. Example value: 'Utility'.

iOS build with Xcode

Tauri leverages Xcode for iOS app building. You can use Xcode to archive and distribute iOS apps instead of the Tauri CLI. Run 'tauri ios build --open' to open the iOS project in Xcode.

CFBundleVersion configuration

Tauri derives CFBundleVersion from tauri.conf.json > version. Custom bundle versions can be set in tauri.conf.json > bundle > iOS > bundleVersion or tauri.conf.json > bundle > macOS > bundleVersion for different versioning schemes such as sequential codes.

Bundle ID must match identifier configuration

The Bundle ID field in App Store Connect must exactly match the identifier defined in tauri.conf.json > identifier.

App Store distribution requirements

Distributing iOS and macOS apps to the App Store requires enrollment in the Apple Developer program and setup of code signing for both macOS and iOS.

App Store distribution targets

Tauri apps can be distributed via the Apple App Store targeting macOS and iOS platforms.

App Store macOS build and bundle commands

To build for App Store with separate configuration, run: tauri build --no-bundle followed by tauri bundle --bundles app --target universal-apple-darwin --config src-tauri/tauri.appstore.conf.json.

AppImage glibc compatibility with older systems

Core libraries such as glibc frequently break compatibility with older systems. Tauri applications should be built using the oldest base system intended for support that provides Tauri v2's required WebKitGTK 4.1 packages. Ubuntu 22.04 and Debian 12 are suitable baseline examples as they provide libwebkit2gtk-4.1-dev from standard package repositories. Building on a newer base system can raise the minimum glibc version required, causing runtime errors like '/usr/lib/libc.so.6: version GLIBC_2.33 not found' on older systems. Docker containers or GitHub Actions are recommended for building Tauri applications for Linux.

AppImage ARM cross-compilation limitations

linuxdeploy, the AppImage tooling Tauri uses, does not support cross-compiling ARM AppImages. ARM AppImages can only be built on ARM devices or emulators. As of August 2025, GitHub provides publicly available ubuntu-22.04-arm and ubuntu-24.04-arm runners that can build AppImages with no changes, with typical builds taking approximately 10 minutes.

AppImage custom files configuration

Custom files can be included in AppImages via tauri.conf.json > bundle > linux > appimage > files. This configuration object maps destination paths in the AppImage to source file paths on the filesystem, relative to the tauri.conf.json file. Destination paths must currently begin with /usr/. Example: {"files": {"/usr/share/README.md": "../README.md", "/usr/assets": "../assets/"}}

AppImage multimedia support configuration

To enable audio/video playback in AppImage bundles, set tauri.conf.json > bundle > linux > appimage > bundleMediaFramework to true. This includes additional GStreamer files needed for media playback and increases the AppImage bundle size. This flag is currently fully supported only on Ubuntu build systems, and the build system must have all plugins the app may need at runtime. GStreamer plugins in the 'ugly' package have licensing restrictions that may make distribution difficult.

AppImage execution on Linux

To run an AppImage, the user must first make the file executable using chmod a+x MyProject.AppImage, then execute it with ./MyProject.AppImage.

AppImage output file size and distribution tradeoff

AppImage output files are larger than typical applications, ranging from 70+ MB compared to the 2-6 MB range of standard builds. AppImages bundle all dependencies and files needed by the application and do not rely on system installed packages. They are easier to distribute and supported on many Linux distributions without requiring installation.

PKGBUILD source variable for Tauri apps

The source variable in PKGBUILD can be made architecture-specific by appending the architecture name to the variable name, for example `source_x86_64` and `source_aarch64`. This allows packaging pre-built Tauri app binaries from different architecture releases.

Tauri app dependencies for AUR PKGBUILD

A Tauri application packaged for AUR must declare these runtime dependencies in the PKGBUILD `depends` variable: cairo, desktop-file-utils, gdk-pixbuf2, glib2, gtk3, hicolor-icon-theme, libsoup, pango, and webkit2gtk-4.1. These are required to make a Tauri app run on Arch Linux.

PKGBUILD options for Tauri packages

When creating a PKGBUILD for a Tauri app, use `options=('!strip' '!emptydirs')` to preserve debugging symbols and directory structure in the package.

Generating .SRCINFO file for AUR submission

Before pushing a package to AUR, generate the .SRCINFO metadata file by running `makepkg --printsrcinfo > .SRCINFO` in the same directory as the PKGBUILD file.

Building Tauri app from source in PKGBUILD

When building a Tauri app from source in PKGBUILD, declare these build dependencies in the `makedepends` variable: git, openssl, appmenu-gtk-module, libappindicator-gtk3, librsvg, cargo, pnpm, and nodejs. Then use `pnpm tauri build -b deb` in the build() function to generate the Debian package.

Give your agent this brain