mix ex_tauri.add (ex_tauri v0.2.0)

View Source

Adds Tauri plugins to your project so the matching Elixir APIs work.

Each plugin normally requires three coordinated edits to src-tauri/: a crate in Cargo.toml, a .plugin(...) registration in src/main.rs, and permissions in capabilities/default.json. This task performs all three for you, and is safe to re-run (already-installed plugins are skipped).

Usage

$ mix ex_tauri.add PLUGIN [PLUGIN...]

Examples

# Enable native dialogs and filesystem access from LiveView
$ mix ex_tauri.add dialog fs

# Enable everything commonly used
$ mix ex_tauri.add dialog fs clipboard os global-shortcut autostart process

Available plugins

PluginElixir APIEnables
dialogExTauri.DialogNative file/message dialogs
fsExTauri.FilesystemFilesystem access outside the sandbox
clipboardExTauri.ClipboardRead/write the system clipboard
osExTauri.OSOS platform/arch/locale info
global-shortcutExTauri.GlobalShortcutApp-wide keyboard shortcuts
autostartExTauri.AutostartLaunch at login
processExTauri.AppExit/relaunch the app
updaterExTauri.UpdaterCheck for and install updates
deep-linkExTauri.EventHandle myapp:// URLs
windowExTauri.WindowRuntime window management permissions

After adding a plugin, rebuild with mix ex_tauri.dev (the Rust side recompiles automatically).