Interface for building Tauri plugins.
A Tauri plugin is a Rust crate that extends a Tauri application with commands, state,
lifecycle hooks and - optionally - Android and iOS native code. This crate holds the pieces
of that interface that are not part of the tauri crate itself, split in two Cargo
features:
build: helpers for the pluginbuild.rs.Builderchecks the crate against the Tauri plugin conventions (thelinkskey must be set and match the crate name, the name cannot contain underscores or be a reserved one), autogenerates theallow-$command/deny-$commandpermissions for the plugin commands, parses the permission files, generates their JSON schema and reference documentation, defines the global scope schema and links the Android/iOS projects of the plugin.plugin_configreads the plugin configuration the Tauri CLI forwards to the build script, and themobilemodule has helpers to patch the generated iOSInfo.plistand entitlements and the Android manifest.runtime: reserved for the runtime side of the plugin interface. It currently exports nothing - usetauri::pluginto define the plugin itself.
Examples
A typical plugin build.rs:
const COMMANDS: & = &;
With a configuration type and an iOS Info.plist change: