Crate tauri[−][src]
Expand description
Tauri is a framework for building tiny, blazing fast binaries for all major desktop platforms. Developers can integrate any front-end framework that compiles to HTML, JS and CSS for building their user interface. The backend of the application is a rust-sourced binary with an API that the front-end can interact with.
Cargo features
The following are a list of Cargo features that can be enabled or disabled:
- wry (enabled by default): Enables the wry runtime. Only disable it if you want a custom runtime.
- menu: Enables application menus support.
- reqwest-client: Uses
reqwest
as HTTP client on thehttp
APIs. Improves performance, but increases the bundle size. - cli: Enables usage of
clap
for CLI argument parsing. Enabled by default if thecli
config is defined on thetauri.conf.json
file. - system-tray: Enables application system tray API. Enabled by default if the
systemTray
config is defined on thetauri.conf.json
file. - updater: Enables the application auto updater. Enabled by default if the
updater
config is defined on thetauri.conf.json
file.
Re-exports
pub use self::window::Monitor; | |
pub use self::window::Window; |
Modules
api | The Tauri API interface. |
async_runtime | Async runtime.
The singleton async runtime used by Tauri and exposed to consumers.
Wraps a |
command | Useful items for custom commands. |
plugin | Extend Tauri functionality. |
settings | The Tauri-specific settings for your runtime e.g. notification permission status. |
updater | Tauri Updater |
window | Tauri window. |
Macros
generate_context | Reads the config file at compile time and generates a |
generate_handler | Accepts a list of commands functions. Creates a handler that allows commands to be called from JS with invoke(). |
tauri_build_context | Include a |
Structs
App | The instance of the currently running application. |
AppHandle | A handle to the currently running application. |
Builder | Builds a Tauri application. |
Config | The tauri.conf.json mapper. |
Context | User supplied data required inside of a Tauri application. |
CustomMenuItem | menu or system-tray A custom menu item. |
GlobalWindowEvent | A window event that was triggered on the specified window. |
Invoke | The message and resolver given to a custom command. |
InvokeError | Error response from an |
InvokeMessage | An invoke message. |
InvokeResolver | Resolver of a invoke message. |
LogicalPosition | A position represented in logical pixels. |
LogicalSize | A size represented in logical pixels. |
Menu | menu A window menu. |
MenuEvent | menu The window menu event. |
PackageInfo |
|
PageLoadPayload | The payload for the |
PhysicalPosition | A position represented in physical pixels. |
PhysicalSize | A size represented in physical pixels. |
RunIteration | Metadata for a runtime event loop iteration on |
State | A guard for a state value. |
StateManager | The Tauri state manager. |
Submenu | menu |
SystemTray | system-tray |
SystemTrayMenu | system-tray A system tray menu. |
SystemTraySubmenu | system-tray |
WebviewAttributes | The attributes used to create an webview. |
WindowMenuEvent | menu A menu event that was triggered on a window. |
Wry | A Tauri |
Enums
Error | Runtime errors that can happen inside a Tauri application. |
Icon | A icon definition. |
InvokeResponse | Response from a |
MenuItem | menu A menu item, bound to a pre-defined action or |
Position | A position that’s either physical or logical. |
Size | A size that’s either physical or logical. |
SystemTrayEvent | system-tray System tray event. |
SystemTrayMenuItem | system-tray System tray menu item. |
UserAttentionType | Type of user attention requested on a window. |
WindowEvent | An event from a window. |
WindowUrl | The window webview URL options. |
Traits
Assets | Represents a container of file assets that are retrievable during runtime. |
Manager | Manages a running application. |
MenuId | A type that can be derived into a menu id. |
Params | Types associated with the running Tauri application. |
Pixel | A pixel definition. Must be created from a |
Tag | Represents a “string-able” type. |
TagRef | A reference to a |
WindowBuilder | A builder for all attributes related to a single webview. |
Type Definitions
InvokeHandler | A closure that is run everytime Tauri receives a message it doesn’t explicitly handle. |
OnPageLoad | A closure that is run once every time a window is created and loaded. |
Result |
|
SetupHook | A closure that is run when the Tauri application is setting up. |
SyncTask | A task to run on the main thread. |
Attribute Macros
command | Mark a function as a command handler. It creates a wrapper function with the necessary glue code. |