AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Tauri Impl Mobile

skill-impertio-studio-tauri-2-claude-skill-package-tauri-impl-mobile · by Impertio-Studio

>

No reviews yet
0 installs
13 views
0.0% view→install

Install

$ agentstack add skill-impertio-studio-tauri-2-claude-skill-package-tauri-impl-mobile

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-impertio-studio-tauri-2-claude-skill-package-tauri-impl-mobile)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Tauri Impl Mobile? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

tauri-impl-mobile

Quick Reference

CLI Commands

| Command | Purpose | |---------|---------| | tauri android init | Initialize Android project files | | tauri ios init | Initialize iOS project files (macOS only) | | tauri android dev | Run on Android emulator/device | | tauri ios dev | Run on iOS simulator/device | | tauri android build | Production build for Android | | tauri ios build | Production build for iOS |

Platform cfg Attributes

| Attribute | Matches | |-----------|---------| | #[cfg(mobile)] | Android and iOS | | #[cfg(desktop)] | Windows, macOS, Linux | | #[cfg(target_os = "android")] | Android only | | #[cfg(target_os = "ios")] | iOS only | | #[cfg(target_os = "windows")] | Windows only | | #[cfg(target_os = "macos")] | macOS only | | #[cfg(target_os = "linux")] | Linux only |

Required Cargo.toml Configuration

[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

Entry Point Structure

| File | Purpose | |------|---------| | src-tauri/src/lib.rs | Shared app logic, run() function with #[cfg_attr(mobile, tauri::mobile_entry_point)] | | src-tauri/src/main.rs | Desktop-only entry point, calls app_lib::run() |

Critical Warnings

NEVER skip the lib.rs + main.rs split when targeting mobile -- mobile platforms require a library crate, not a binary.

NEVER omit "staticlib" from crate-type -- iOS requires static linking.

NEVER omit "cdylib" from crate-type -- Android requires dynamic linking.

NEVER forget the #[cfg_attr(mobile, tauri::mobile_entry_point)] attribute on the run() function -- without it, the mobile app has no entry point and will not start.

ALWAYS keep "rlib" in crate-type -- the desktop main.rs depends on it to import app_lib::run().

ALWAYS test platform-specific code paths on actual target platforms -- #[cfg] attributes silently exclude code at compile time.


Prerequisites

Android

  1. Android Studio with:
  • SDK Platform (API level 24+)
  • Platform-Tools
  • NDK (Side by side)
  • Build-Tools
  • Command-line Tools
  1. Environment variables:

``bash export JAVA_HOME="/path/to/jdk" export ANDROID_HOME="/path/to/Android/Sdk" export NDK_HOME="$ANDROID_HOME/ndk/" ``

  1. Rust targets:

``bash rustup target add aarch64-linux-android rustup target add armv7-linux-androideabi rustup target add i686-linux-android rustup target add x86_64-linux-android ``

iOS (macOS only)

  1. Xcode (full installation, not just Command Line Tools)
  1. Cocoapods:

``bash brew install cocoapods ``

  1. Rust targets:

``bash rustup target add aarch64-apple-ios rustup target add x86_64-apple-ios rustup target add aarch64-apple-ios-sim ``


Essential Patterns

Pattern 1: Project Restructuring for Mobile

Transform a desktop-only project to support mobile:

Before (desktop only):

src-tauri/src/
  main.rs    # Contains all app logic

After (desktop + mobile):

src-tauri/src/
  lib.rs     # All app logic moves here
  main.rs    # Minimal desktop entry point
// src-tauri/src/lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![/* commands */])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
// src-tauri/src/main.rs
// Prevents an additional console window on Windows in release
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
    app_lib::run();
}
# src-tauri/Cargo.toml
[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

Pattern 2: Platform-Specific Code

// Conditional compilation for platform-specific behavior
#[cfg(desktop)]
fn setup_desktop(app: &tauri::App) {
    // Desktop-only: system tray, global shortcuts, etc.
}

#[cfg(mobile)]
fn setup_mobile(app: &tauri::App) {
    // Mobile-only: biometrics, push notifications, etc.
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    let builder = tauri::Builder::default();

    #[cfg(desktop)]
    let builder = builder.setup(|app| {
        setup_desktop(app);
        Ok(())
    });

    #[cfg(mobile)]
    let builder = builder.setup(|app| {
        setup_mobile(app);
        Ok(())
    });

    builder
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Pattern 3: Platform-Specific Commands

#[cfg(desktop)]
#[tauri::command]
fn open_dev_tools(window: tauri::WebviewWindow) {
    window.open_devtools();
}

#[cfg(mobile)]
#[tauri::command]
fn request_biometric() -> Result {
    // Mobile biometric authentication
    Ok(true)
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![
            // Shared commands
            shared_command,
            // Platform-specific commands
            #[cfg(desktop)]
            open_dev_tools,
            #[cfg(mobile)]
            request_biometric,
        ])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Pattern 4: Mobile Bundle Configuration

// tauri.conf.json
{
  "bundle": {
    "iOS": {
      "minimumSystemVersion": "14.0"
    },
    "android": {
      "minSdkVersion": 24,
      "versionCode": 1
    }
  }
}

Pattern 5: Initializing and Running Mobile Targets

# One-time initialization (generates platform project files)
tauri android init
tauri ios init

# Development (hot-reload)
tauri android dev
tauri ios dev

# Development on a specific device
tauri android dev --device 
tauri ios dev --device 

# Production builds
tauri android build
tauri ios build

# Production build for specific target
tauri android build --target aarch64
tauri ios build --target aarch64-apple-ios

Pattern 6: Mobile Plugin Hooks

Plugins can have mobile-specific initialization:

use tauri::plugin::{Builder, TauriPlugin};
use tauri::Runtime;

pub fn init() -> TauriPlugin {
    Builder::new("my-mobile-plugin")
        .setup(|app, api| {
            #[cfg(target_os = "android")]
            {
                // Android-specific plugin setup
                // Access Android-specific APIs via PluginApi
            }
            #[cfg(target_os = "ios")]
            {
                // iOS-specific plugin setup
            }
            Ok(())
        })
        .build()
}

Crate-Type Explanation

The crate-type array in Cargo.toml controls how the Rust code is compiled:

| Crate Type | Purpose | Required For | |------------|---------|--------------| | staticlib | Static library (.a) | iOS -- statically linked into the app binary | | cdylib | C-compatible dynamic library (.so/.dylib) | Android -- loaded as a JNI shared library | | rlib | Rust library | Desktop -- main.rs imports app_lib::run() |

All three MUST be present for full cross-platform support.


Project Structure After Mobile Init

my-tauri-app/
  src/                          # Frontend (shared across all platforms)
  src-tauri/
    src/
      lib.rs                    # Shared entry point
      main.rs                   # Desktop entry point
    gen/
      android/                  # Generated by `tauri android init`
        app/
          src/main/
            java/.../           # Android activity
        build.gradle.kts
      apple/                    # Generated by `tauri ios init`
        .xcodeproj/
        Sources/
    Cargo.toml
    tauri.conf.json

Reference Links

  • [references/methods.md](references/methods.md) -- Complete reference for mobile CLI commands, cfg attributes, Cargo.toml configuration
  • [references/examples.md](references/examples.md) -- Working code examples for mobile development patterns
  • [references/anti-patterns.md](references/anti-patterns.md) -- Common mobile development mistakes with explanations

Official Sources

  • https://v2.tauri.app/start/prerequisites/#android
  • https://v2.tauri.app/start/prerequisites/#ios
  • https://v2.tauri.app/develop/mobile/

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.