Crate tauri_macros

Source
Expand description

Create macros for tauri::Context, invoke handler and commands leveraging the tauri-codegen crate.

Macros§

do_menu_item
Accepts a closure-like syntax to call arbitrary code on a menu item after matching against kind and retrieving it from resources_table using rid.
generate_context
Reads a Tauri config file and generates a ::tauri::Context based on the content.
generate_handler
Accepts a list of command functions. Creates a handler that allows commands to be called from JS with invoke().
include_image
Convert a .png or .ico icon to an Image for things like tauri::tray::TrayIconBuilder to consume, relative paths are resolved from CARGO_MANIFEST_DIR, not current file

Attribute Macros§

command
Mark a function as a command handler. It creates a wrapper function with the necessary glue code.
mobile_entry_point