ExTauri (ex_tauri v0.2.0)
View SourceExTauri provides integration between Phoenix and Tauri for building native desktop applications.
This module provides core functionality for running Tauri commands and
managing the Tauri installation. For installation and setup, use
Mix.Tasks.ExTauri.Install. For running commands, use the dedicated
Mix tasks like Mix.Tasks.ExTauri.Dev and Mix.Tasks.ExTauri.Build.
Summary
Functions
Returns the path to the Tauri installation.
Returns the latest version of Tauri available.
Runs a Tauri CLI command after building a full production release.
Runs a Tauri CLI command in development mode.
Runs a Tauri CLI command without building the Elixir release.
Returns the ex_tauri package version.
Functions
Returns the path to the Tauri installation.
The executable may not be available if it was not yet installed.
Returns the latest version of Tauri available.
Runs a Tauri CLI command after building a full production release.
This function builds the Elixir release (with Burrito wrapping), then executes the Tauri CLI. Use this for production builds only.
For development, use run_dev/1 which skips Burrito for faster iteration.
For commands that don't need a release at all, use run_simple/1.
Examples
ExTauri.run(["build", "--target", "x86_64-apple-darwin"])
Runs a Tauri CLI command in development mode.
By default (sidecar: :phx_server) the sidecar is a small wrapper that runs
the configured dev-server command — mix phx.server unless overridden via
config :ex_tauri, :dev_command — directly, so code reloading, live reload,
and dev config work inside the Tauri window.
Pass sidecar: :release to instead build a standard Elixir release (no
Burrito) and run that as the sidecar. Use it to exercise release boot,
runtime config, and migrations without waiting for a full production build.
Any name registered under config :ex_tauri, :sidecars (or a module
implementing ExTauri.Sidecar) may also be passed. See ExTauri.Sidecar.
The configured :port is exported as EX_TAURI_PORT so the generated Rust
code uses it instead of picking a free port (dev server config has a fixed
port).
Examples
ExTauri.run_dev(["dev", "--no-dev-server-wait"])
ExTauri.run_dev(["dev", "--no-dev-server-wait"], sidecar: :release)
Runs a Tauri CLI command without building the Elixir release.
Use this for commands that don't require a sidecar binary, such as:
info- Display project informationicon- Generate application iconssigner- Manage code signing
Examples
ExTauri.run_simple(["info"])
ExTauri.run_simple(["icon", "app-icon.png"])
Returns the ex_tauri package version.
This is the single source of truth for the version (defined as
@version in mix.exs); everything that would otherwise hardcode a
version string derives it from here.