mix ex_tauri.install (ex_tauri v0.2.0)
View SourceInstalls and configures Tauri in your Phoenix project.
Uses Igniter for safe, AST-aware modifications to your Elixir project files, then sets up the Tauri project structure with Rust code, capabilities, and a JS bridge.
Usage
$ mix ex_tauri.install
What It Does
Sets default config (via Igniter) —
app_name,host,port,versioninconfig/config.exs(only if not already configured)Configures Elixir project (via Igniter):
- Adds
ExTauri.ShutdownManagerto your supervision tree - Adds a
:desktoprelease to yourmix.exs
- Adds
Installs Tauri CLI — Downloads via Cargo
Initializes Tauri project — Creates
src-tauri/structureGenerates integration code:
- Rust main.rs with heartbeat and graceful shutdown
- Tauri V2 capabilities and permissions
- LiveView JS hook for Tauri bridge
Auto-injects hooks:
- Imports
TauriHookinassets/js/app.js - Registers the hook in the LiveSocket constructor
- Adds
<div id="tauri-bridge">to the root layout
- Imports
Next Steps
After installation, just run:
$ mix ex_tauri.dev
Review the generated config in config/config.exs to customize your
app name, port, or window settings.
For more information, see: https://github.com/filipecabaco/ex_tauri