{"_id":"@capawesome/capacitor-tauri","name":"@capawesome/capacitor-tauri","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-tauri","version":"0.0.1","description":"Capacitor platform for building desktop apps with Tauri.","main":"dist/runtime/index.js","types":"dist/types/runtime/index.d.ts","exports":{".":{"types":"./dist/types/runtime/index.d.ts","default":"./dist/runtime/index.js"},"./package.json":"./package.json"},"bin":{"capacitor-tauri":"dist/cli/index.js"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-tauri.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-tauri/issues"},"homepage":"https://capawesome.io/","keywords":["capacitor","capacitor-platform","tauri","desktop"],"scripts":{"capacitor:add":"node ./dist/cli/index.js add","capacitor:copy":"node ./dist/cli/index.js copy","capacitor:update":"node ./dist/cli/index.js update","capacitor:open":"node ./dist/cli/index.js open","capacitor:run":"node ./dist/cli/index.js run","verify":"npm run build && npm run test","lint":"npm run eslint && npm run prettier -- --check","fmt":"npm run eslint -- --fix && npm run prettier -- --write","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js}\"","build":"npm run clean && npm run build:shim && tsc --project tsconfig.build.json && tsc --project tsconfig.types.json && rollup -c rollup.config.mjs","build:shim":"node ./scripts/build-shim.mjs","clean":"rimraf ./dist ./build","test":"vitest run","prepare":"husky","prepublishOnly":"npm run build"},"lint-staged":{"**/*.{css,html,ts,js,json}":"prettier --write"},"devDependencies":{"@capacitor/core":"8.0.0","@ionic/eslint-config":"0.4.0","@types/node":"24.13.3","esbuild":"0.25.12","eslint":"8.57.0","husky":"9.1.7","lint-staged":"17.0.5","prettier":"3.4.2","rimraf":"6.1.2","rollup":"4.53.3","typescript":"5.9.3","vitest":"4.1.10"},"peerDependencies":{"@tauri-apps/cli":">=2.0.0"},"peerDependenciesMeta":{"@tauri-apps/cli":{"optional":true}},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"gitHead":"bbf0b4e3ce929689370b8d569f32d4a0b7b0fa29","_id":"@capawesome/capacitor-tauri@0.0.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-GUPfA+4YAhN3GBSTsaNy5tr3sEtKJTAqIsmtTcK95gaoQSdd11kgStEx7SzbVtr5y1sPDq40vdls4IXz43hWlg==","shasum":"c32f0b2304bb092ece8483c7a62395a361c18cca","tarball":"https://registry.npmjs.org/@capawesome/capacitor-tauri/-/capacitor-tauri-0.0.1.tgz","fileCount":39,"unpackedSize":181660,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGZULyqMhBwTkQ5aPHsbaXWRpACsJl4b9Ed2HOjGHlfrAiEAzk794njdz/D4QaplxvO453K5un/wMCHeUj5wQwydQsY="}]},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-tauri_0.0.1_1783848582309_0.09793623334878299"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-12T09:29:42.135Z","0.0.1":"2026-07-12T09:29:42.465Z","modified":"2026-07-12T09:29:42.682Z"},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"description":"Capacitor platform for building desktop apps with Tauri.","homepage":"https://capawesome.io/","keywords":["capacitor","capacitor-platform","tauri","desktop"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-tauri.git"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-tauri/issues"},"license":"MIT","readme":"# Capacitor Tauri Platform\n\nCapacitor platform to build, run, and package lean, secure desktop apps for macOS, Windows, and Linux with Tauri.[^1]\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\nThe Capacitor Tauri platform brings your web app to the desktop with tiny binaries and a security-first Rust core. Here are some of the key features:\n\n- 🪶 **Tiny binaries**: System-webview apps are a few megabytes instead of the ~100 MB an embedded browser needs.\n- 🔒 **Security-first**: A Rust core with deny-by-default permissions; capabilities are generated with the minimum grants your plugins need.\n- ⚡ **Familiar workflow**: `cap add`, `cap sync`, `cap run` — the same commands as iOS and Android.\n- 🧩 **Curated plugins**: Ready-made implementations of core Capacitor plugins on top of official `tauri-plugin-*` crates.\n- 🕸️ **Web plugins run free**: Any Capacitor plugin with a web implementation works via automatic fallback.\n- 🔗 **Deep links**: Custom URL schemes delivered through the standard `@capacitor/app` `appUrlOpen` event.\n- 📱 **App lifecycle**: `appStateChange`, `pause`, and `resume` events, exactly like on mobile.\n- ♻️ **Live reload**: Develop against your web dev server with full HMR.\n- 📦 **Packaging**: Native installers (`.dmg`, `.msi`/`.exe`, `.deb`/`.AppImage`) via Tauri's bundler.\n- 🧩 **Minimal scaffold**: You own a thin `src-tauri/`; all runtime logic ships in the crate and updates via `cargo update`.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor and Tauri versions.\n- ⭐️ **Support**: Priority support from the Capawesome Team.\n- ✨ **Handcrafted**: Built from the ground up with care and expertise, not forked or AI-generated.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-tauri/issues) and we'll take a look!\n\n## Electron or Tauri?\n\nThis platform is a **complement** to the [Capacitor Electron platform](https://capawesome.io/docs/sdks/capacitor/electron/), not a replacement. Pick based on your priorities:\n\n| | **Tauri** (this platform) | **Electron** |\n| --- | --- | --- |\n| Binary size | ~3–10 MB | ~80–150 MB |\n| Webview | System (WKWebView / WebView2 / WebKitGTK) | Bundled Chromium |\n| Plugin story | Web impls + curated shims + bespoke Rust | The full Capacitor plugin ecosystem (any `electron` impl) |\n| Web-bundle OTA | Not available | Available |\n\nChoose **Tauri** for lean, secure, kiosk-style and consumer apps. Choose **Electron** for plugin-heavy or OTA-dependent apps.\n\n## Use Cases\n\nThe Tauri platform is typically used to bring an existing Capacitor app to the desktop with a minimal footprint, for example:\n\n- **Lean consumer desktop apps**: Ship a few-megabyte installer instead of a hundred-megabyte one.\n- **Security-sensitive tools**: Rely on a Rust core with deny-by-default, per-plugin permissions.\n- **Kiosk and point-of-sale apps**: Run your web app full screen on dedicated hardware.\n- **Internal business tools**: Distribute directly to your team without app stores.\n\n## Compatibility\n\n| Platform Version | Capacitor Version | Tauri Version | Status         |\n| ---------------- | ----------------- | ------------- | -------------- |\n| 0.x              | >=8.x.x           | >=2.x.x       | Active support |\n\n## Supported Plugins\n\nThe plugin story has three tiers (see [Honest Limitations](#honest-limitations)):\n\n| Plugin | Tier | Backed by |\n| --- | --- | --- |\n| [`@capacitor/app`](https://capacitorjs.com/docs/apis/app) | Built-in | The platform crate + deep-link plugin |\n| [`@capacitor/filesystem`](https://capacitorjs.com/docs/apis/filesystem) | Curated | `tauri-plugin-fs` |\n| [`@capacitor/preferences`](https://capacitorjs.com/docs/apis/preferences) | Curated | `tauri-plugin-store` |\n| [`@capacitor/dialog`](https://capacitorjs.com/docs/apis/dialog) | Curated | `tauri-plugin-dialog` |\n| [`@capacitor/local-notifications`](https://capacitorjs.com/docs/apis/local-notifications) | Curated | `tauri-plugin-notification` |\n| Plugins with a web implementation | Web fallback | The plugin's own `web` implementation |\n\nPlugins that require native functionality beyond the curated set need a bespoke Rust implementation. Want your favorite plugin curated? Just [open an issue](https://github.com/capawesome-team/capacitor-tauri/issues).\n\n## Prerequisites\n\nTauri requires the **Rust toolchain** and your platform's system dependencies. Follow the [Tauri prerequisites guide](https://v2.tauri.app/start/prerequisites/) before installing.\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to add the platform.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-platforms\n```\n\nThen use the following prompt:\n\n```\nUse the `capacitor-platforms` skill from `capawesome-team/skills` to add the `@capawesome/capacitor-tauri` platform to my project.\n```\n\nIf you prefer **Manual Setup**, add the platform by running the following commands:\n\n```bash\nnpm install @capawesome/capacitor-tauri\nnpx cap add @capawesome/capacitor-tauri\n```\n\n> [!NOTE]\n> Always use the full package name with Capacitor CLI commands (e.g. `npx cap sync @capawesome/capacitor-tauri`). A bare `npx cap sync tauri` does nothing.\n\nThe scaffolded `src-tauri/` project contains only files you own:\n\n| File | Purpose |\n| --- | --- |\n| `src/main.rs` | ~3 lines: starts the app via the platform crate |\n| `tauri.conf.json` | App configuration (window, CSP, deep links, bundle) |\n| `capabilities/` | Permission grants (regenerated at sync) |\n| `Cargo.toml` | Crate dependencies (curated plugin crates added at sync) |\n| `icons/` | App icons |\n\nEverything with logic lives in the `capacitor-tauri` crate and updates via `cargo update` — your `src-tauri/` never rots.\n\n## Usage\n\n```bash\n# Copy web assets + generate capabilities and plugin registrations\nnpx cap sync @capawesome/capacitor-tauri\n\n# Run the app (uses server.url for live reload when configured)\nnpx cap run @capawesome/capacitor-tauri\n```\n\nAt sync time the platform scans your Capacitor plugin dependencies, generates a deny-by-default capability file with only the permissions the enabled curated plugins need, and wires the matching `tauri-plugin-*` crates into your project.\n\n### Live Reload\n\nSet `server.url` in your Capacitor config to your dev server, then run `npx cap run @capawesome/capacitor-tauri` — it launches `tauri dev` pointing at your dev server with full HMR.\n\n### Deep Links\n\nDeclare the scheme in `src-tauri/tauri.conf.json` (`plugins.deep-link.desktop.schemes`) and listen with the standard `@capacitor/app` plugin:\n\n```typescript\nimport { App } from '@capacitor/app';\n\nawait App.addListener('appUrlOpen', ({ url }) => {\n  console.log('App opened with URL:', url);\n});\n```\n\n## Packaging\n\nSync first, then run Tauri's bundler from your project root:\n\n```bash\nnpx cap sync @capawesome/capacitor-tauri\nnpx tauri build\n```\n\nTauri's bundler produces native installers for the current OS (`.dmg`/`.app`, `.msi`/`.exe`, `.deb`/`.AppImage`). Signing, updater, and target configuration live in `src-tauri/tauri.conf.json` — see the [Tauri distribution guide](https://v2.tauri.app/distribute/).\n\n## Honest Limitations\n\nRead this before choosing Tauri — these are inherent trade-offs, not bugs:\n\n1. **No plugin-ecosystem reuse.** Tauri's core is Rust; there is no Node.js runtime. Only Tier-1 web implementations, the curated Tier-2 shims, and bespoke Tier-3 Rust plugins work. Arbitrary Capacitor native plugins do **not** run. This is the main reason to choose the [Electron platform](https://capawesome.io/docs/sdks/capacitor/electron/) instead.\n2. **Three webview engines.** WKWebView (macOS), WebView2 (Windows), and WebKitGTK (Linux) behave differently — a real cross-engine testing burden, worst on Linux. Electron's single bundled Chromium is more predictable.\n3. **No web-bundle OTA.** Web assets are compiled into the binary; there is no Live Update / over-the-air web-bundle mechanism. Only full signed binary updates (via `tauri-plugin-updater`) are possible.\n4. **Rust toolchain required.** Developers and CI need Rust and platform system dependencies installed, with longer first builds and large `target/` directories.\n\n## FAQ\n\n### Can I use any Capacitor plugin?\n\nOnly plugins with a web implementation, a curated Tier-2 shim, or a bespoke Tauri implementation (see [Supported Plugins](#supported-plugins)). If you need the full plugin ecosystem, use the [Electron platform](https://capawesome.io/docs/sdks/capacitor/electron/).\n\n### Does `Capacitor.getPlatform()` return `tauri`?\n\nYes. `Capacitor.getPlatform()` returns `'tauri'` and `Capacitor.isNativePlatform()` returns `true`.\n\n### Does this support over-the-air updates?\n\nNot for web bundles. Tauri compiles the web assets into the binary; only full signed binary updates are supported.\n\n## Related\n\n- [Capacitor Electron platform](https://capawesome.io/docs/sdks/capacitor/electron/) — maximum compatibility and web-bundle OTA, with larger binaries.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-tauri/blob/main/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-tauri/blob/main/LICENSE).\n\n[^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by the Tauri Programme within the Commons Conservancy. `Tauri` is a trademark of the Tauri Programme within the Commons Conservancy.\n","readmeFilename":"README.md","_rev":"1-5c910eec0d088e54ef4fc25f020904c0"}