Expand description
Create macros for tauri::Context, invoke handler and commands leveraging the tauri-codegen crate.
Don’t depend on this crate directly, use the re-exported types from tauri instead.
Macros§
- generate_
context - Reads a Tauri config file and generates a
::tauri::Contextbased 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::TrayIconBuilderto consume, relative paths are resolved fromCARGO_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 - Marks a function as the entry point of a mobile application.