"Sometimes the feature you need already exists as a command-line tool. A sidecar lets you ship it inside your app and drive it."
What a Sidecar Is
A sidecar is an external executable you bundle with your app and run at runtime — ffmpeg for video, a Python script compiled to a binary, a Go CLI, anything. Instead of asking users to install a dependency, you embed it, and your Rust core spawns it when needed. It's how a Tauri app delivers heavy native functionality that would be impractical to reimplement in Rust.
Declaring and Naming It
You list the binary under bundle.externalBin in tauri.conf.json, and — this trips everyone once — the actual file must carry a target-triple suffix so the right binary ships per platform: ffmpeg-aarch64-apple-darwin, ffmpeg-x86_64-pc-windows-msvc.exe, and so on. Tauri picks the matching one at build time and resolves the plain name at runtime. Forget the suffix and the bundler can't find your binary.
Running It Goes Through shell — So Scope It
You execute a sidecar via the shell plugin's Command.sidecar(...), which means it's subject to the same security discipline: the shell capability must permit that specific sidecar, scoped to it and (ideally) its allowed arguments. A sidecar is privileged native execution, so treat it with the same caution as any shell command — grant exactly this binary, nothing more. (Note: not every app needs sidecars. Cinder, for instance, reaches its heavy image work over a network service rather than bundling a binary — a different architecture for a different need.)