- Home
- Skills
- Dchuk
- Claude Code Tauri Skills
- Tauri Sidecar
tauri-sidecar_skill
12
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill dchuk/claude-code-tauri-skills --skill tauri-sidecar- SKILL.md10.9 KB
Overview
This skill teaches how to embed and run external binaries (sidecars) inside Tauri v2 applications. It covers configuration, cross-platform executable naming, and the Rust and JavaScript APIs for launching, streaming, and managing sidecar processes. The goal is to let you bundle auxiliary tools so users do not need separate installations.
How this skill works
Register sidecars in tauri.conf.json under bundle.externalBin and include platform-specific filenames (target-triple suffixes) in src-tauri/binaries. Use the tauri-plugin-shell in Rust and @tauri-apps/plugin-shell in the frontend to execute sidecars, pass arguments, capture output, stream logs, and manage long-running processes. Capabilities must grant explicit shell permissions and optional argument validators to restrict allowed arguments.
When to use it
- You need to bundle a CLI tool, small server, or native helper with your app so users do not install it separately.
- A platform-specific compiled binary (Rust, Go, Python packaged with PyInstaller) provides functionality not available in the web layer.
- You require streaming stdout/stderr or background processes (API server, file watcher) managed by the app.
- You want to minimize runtime dependencies by shipping self-contained executables with your installer.
- You must validate and restrict command arguments for security-sensitive operations.
Best practices
- Add tauri-plugin-shell and register it in main.rs before using sidecars.
- Place platform variants in src-tauri/binaries with target triple suffixes and list stems in bundle.externalBin.
- Define shell permissions and argument validators in capabilities to limit execution and allowed args.
- Handle errors and missing binaries gracefully; check process exit status and return stderr for failures.
- Manage lifecycle: spawn long-running sidecars, capture logs, and kill processes on app exit.
- Test builds on every target (Windows, macOS Intel/Apple Silicon, Linux x86_64/ARM) and ensure executables have proper permissions.
Example use cases
- Bundle a Rust or Go data-processor binary and invoke it from frontend via an invoke handler.
- Package a Python CLI with PyInstaller as a sidecar for repeated local data conversions.
- Spawn a local API server sidecar and stream logs to the app UI while keeping it running in background.
- Use argument validators in capabilities to safely allow file paths and restrict dangerous flags.
- Provide platform-specific binaries to avoid runtime dependency issues across user machines.
FAQ
Yes. Provide platform-specific files with the target triple suffix and .exe for Windows. In tauri.conf.json list the stem; Tauri resolves the correct platform file at build time.
How do I restrict what arguments a sidecar can receive?
Configure argument validators in your capabilities JSON. You can list static allowed strings, regex validators, or use true to allow any argument (use sparingly).