Skip to main content

Crate origin_tauri

Crate origin_tauri 

Source
Expand description

The Tauri host layer (ADR-0001).

Everything Tauri-specific about an Origin application lives here: plugin registration, tray, window handling, the IPC surface and the bridge that forwards platform events to the webview.

A product’s main.rs stays small:

fn main() {
    let config = HostConfig::new("dev.origin.demo");
    origin_tauri::builder(&config)
        .invoke_handler(origin_handler![my_product_command])
        .setup(move |app| {
            let application = my_product::build(app.handle())?;
            origin_tauri::attach(app.handle(), application, &config)?;
            Ok(())
        })
        .run(tauri::generate_context!())
        .expect("failed to start");
}

Re-exports§

pub use commands::CommandError;

Modules§

commands
The platform IPC surface.
defaults
The standard desktop wiring.

Macros§

origin_handler
Builds a Tauri invoke handler containing Origin’s own commands plus the product’s.

Structs§

HostConfig
Host-level product configuration.
OriginState
Tauri-managed state: the assembled application plus its host configuration.
TauriNotificationService
TauriOpener
Opens URLs in the user’s default browser.
TauriTrayService
A TrayService backed by a running Tauri tray icon.

Functions§

attach
Hand the assembled application to the desktop shell.
builder
A tauri::Builder with the Origin plugin set already registered.
focus_main_window
Show and focus the main window, creating nothing — if it was closed to tray it is only hidden.