Crate lucas_test
source · [−]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.
- isolation: Enables the isolation pattern. Enabled by default if the
tauri > pattern > useconfig option is set toisolationon thetauri.conf.jsonfile. - custom-protocol: Feature managed by the Tauri CLI. When enabled, Tauri assumes a production environment instead of a development one.
- updater: Enables the application auto updater. Enabled by default if the
updaterconfig is defined on thetauri.conf.jsonfile. - devtools: Enables the developer tools (Web inspector) and
Window::open_devtools. Enabled by default on debug builds. On macOS it uses private APIs, so you can’t enable it if your app will be published to the App Store. - http-api: Enables the
api::httpmodule. - reqwest-client: Uses
reqwestas HTTP client on thehttpAPIs. Improves performance, but increases the bundle size. - command: Enables the
api::process::CommandAPIs. - dialog: Enables the
api::dialogmodule. - notification: Enables the
api::notificationmodule. - cli: Enables usage of
clapfor CLI argument parsing. Enabled by default if thecliconfig is defined on thetauri.conf.jsonfile. - system-tray: Enables application system tray API. Enabled by default if the
systemTrayconfig is defined on thetauri.conf.jsonfile. - macos-private-api: Enables features only available in macOS’s private APIs, currently the
transparentwindow functionality and thefullScreenEnabledpreference setting totrue. Enabled by default if thetauri > macosPrivateApiconfig flag is set totrueon thetauri.conf.jsonfile. - window-data-url: Enables usage of data URLs on the webview.
Cargo allowlist features
The following are a list of Cargo features that enables commands for Tauri’s API package.
These features are automatically enabled by the Tauri CLI based on the allowlist configuration under tauri.conf.json.
- api-all: Enables all API endpoints.
Clipboard allowlist
- clipboard-all: Enables all Clipboard APIs.
- clipboard-read-text: Enables the
readTextAPI. - clipboard-write-text: Enables the
writeTextAPI.
Dialog allowlist
- dialog-all: Enables all Dialog APIs.
- dialog-ask: Enables the
askAPI. - dialog-confirm: Enables the
confirmAPI. - dialog-message: Enables the
messageAPI. - dialog-open: Enables the
openAPI. - dialog-save: Enables the
saveAPI.
Filesystem allowlist
- fs-all: Enables all Filesystem APIs.
- fs-copy-file: Enables the
copyFileAPI. - fs-create-dir: Enables the
createDirAPI. - fs-read-dir: Enables the
readDirAPI. - fs-read-file: Enables the
readTextFileAPI and thereadBinaryFileAPI. - fs-remove-dir: Enables the
removeDirAPI. - fs-remove-file: Enables the
removeFileAPI. - fs-rename-file: Enables the
renameFileAPI. - fs-write-file: Enables the
writeFileAPI and thewriteBinaryFileAPI.
Global shortcut allowlist
- global-shortcut-all: Enables all GlobalShortcut APIs.
HTTP allowlist
- http-all: Enables all HTTP APIs.
- http-request: Enables the
requestAPIs.
Notification allowlist
- notification-all: Enables all Notification APIs.
OS allowlist
- os-all: Enables all OS APIs.
Path allowlist
- path-all: Enables all Path APIs.
Process allowlist
- process-all: Enables all Process APIs.
- process-exit: Enables the
exitAPI. - process-relaunch: Enables the
relaunchAPI.
Protocol allowlist
- protocol-all: Enables all Protocol APIs.
- protocol-asset: Enables the
assetcustom protocol.
Shell allowlist
- shell-all: Enables all Clipboard APIs.
- shell-execute: Enables executing arbitrary programs.
- shell-sidecar: Enables executing a
sidecarprogram. - shell-open: Enables the
openAPI.
Window allowlist
- window-all: Enables all Window APIs.
- window-create: Enables the API used to create new windows.
- window-center: Enables the
centerAPI. - window-request-user-attention: Enables the
requestUserAttentionAPI. - window-set-resizable: Enables the
setResizableAPI. - window-set-title: Enables the
setTitleAPI. - window-maximize: Enables the
maximizeAPI. - window-unmaximize: Enables the
unmaximizeAPI. - window-minimize: Enables the
minimizeAPI. - window-unminimize: Enables the
unminimizeAPI. - window-show: Enables the
showAPI. - window-hide: Enables the
hideAPI. - window-close: Enables the
closeAPI. - window-set-decorations: Enables the
setDecorationsAPI. - window-set-always-on-top: Enables the
setAlwaysOnTopAPI. - window-set-size: Enables the
setSizeAPI. - window-set-min-size: Enables the
setMinSizeAPI. - window-set-max-size: Enables the
setMaxSizeAPI. - window-set-position: Enables the
setPositionAPI. - window-set-fullscreen: Enables the
setFullscreenAPI. - window-set-focus: Enables the
setFocusAPI. - window-set-icon: Enables the
setIconAPI. - window-set-skip-taskbar: Enables the
setSkipTaskbarAPI. - window-start-dragging: Enables the
startDraggingAPI. - window-print: Enables the
printAPI.
Re-exports
pub use tauri_runtime as runtime;pub use tauri_utils as utils;pub use self::window::Monitor;pub use self::window::Window;pub use scope::*;Modules
The Tauri API interface.
The singleton async runtime used by Tauri and exposed to users.
The Tauri custom commands types and traits.
The Tauri plugin extension to expand Tauri functionality.
The allowlist scopes.
The Tauri-specific settings for your application.
updaterThe Tauri updater.
The Tauri window types and functions.
Macros
Reads the config file at compile time and generates a Context based on its content.
Accepts a list of commands functions. Creates a handler that allows commands to be called from JS with invoke().
Include a Context that was generated by tauri-build inside your build script.
Structs
The instance of the currently running application.
A handle to the currently running application.
A resolved asset.
The asset resolver is a helper to access the tauri_utils::assets::Assets interface.
Builds a Tauri application.
Api exposed on the CloseRequested event.
The config type mapped to tauri.conf.json.
User supplied data required inside of a Tauri application.
A custom menu item.
Information about environment variables.
An event that was triggered.
Represents an event handler.
A window event that was triggered on the specified window.
The message and resolver given to a custom command.
Error response from an InvokeMessage.
An invoke message.
The payload used on the IPC invoke.
Resolver of a invoke message.
A position represented in logical pixels.
A size represented in logical pixels.
A window menu.
The window menu event.
tauri::App package information.
The payload for the OnPageLoad hook.
The path resolver is a helper for the application-specific crate::api::path APIs.
A position represented in physical pixels.
A size represented in physical pixels.
Metadata for a runtime event loop iteration on run_iteration.
A guard for a state value.
The Tauri state manager.
system-trayA handle to a system tray. Allows updating the context menu items.
system-trayA system tray menu.
system-trayThe attributes used to create an webview.
A menu event that was triggered on a window.
Enums
Runtime errors that can happen inside a Tauri application.
A icon definition.
Response from a InvokeMessage passed to the InvokeResolver.
An entry on the system tray menu.
A menu item, bound to a pre-defined action or Custom emit an event. Note that status bar only
supports Custom menu item variants. And on the menu bar, some platforms might not support some
of the variants. Unsupported variant will be no-op on such platform.
An application pattern.
A position that’s either physical or logical.
An application event, triggered from the event loop.
A size that’s either physical or logical.
system-traySystem tray event.
system-traySystem tray menu item.
Type of user attention requested on a window.
An event from a window.
An URL to open on a Tauri webview window.
Traits
Represents a container of file assets that are retrievable during runtime.
Clipboard manager.
A global shortcut manager.
Manages a running application.
A pixel definition. Must be created from a f64 value.
The webview runtime interface.
A builder for all attributes related to a single webview.
Type Definitions
A closure that is run everytime Tauri receives a message it doesn’t explicitly handle.
A closure that is responsible for respond a JS message.
A closure that is run once every time a window is created and loaded.
Result<T, ::tauri::Error>
A closure that is run when the Tauri application is setting up.
A task to run on the main thread.
Attribute Macros
Mark a function as a command handler. It creates a wrapper function with the necessary glue code.