Expand description
The Tauri side of krizaka-rust: one plugin a Krizaka Mac app adds, so its own lib.rs only holds what is the
product’s (its commands, each resolving its paths through Kit::resolve).
ⓘ
tauri::Builder::default()
.plugin(tauri_plugin_krizaka::dialog::init())
.plugin(
tauri_plugin_krizaka::Builder::new("verikora")
.link_hosts(["www.verikora.com", "dev.verikora.com"])
.link_prefixes(["/app", "/verify"])
.build(),
)
.invoke_handler(tauri::generate_handler![read_document])
.run(tauri::generate_context!())What it brings, and what the page reaches through @krizaka/app-desktop (capability krizaka:default):
- folders the person grants with the native picker, listed, revoked, watched; files dropped on the window
(event
DROPPED); every path through the kit’s one gate (krizaka_rust::access::Access); - small secrets in the macOS Keychain (the session token), the
KeyValueStorageof@krizaka/app-client; - the native menu bar the page describes in its own words (
krizaka_rust::menu::MenuSpec), clicks sent back asMENU; - deep links (
<scheme>://…and the product’s web links) turned into a route (OPEN, andtake_linksfor the ones that arrived before the page listened); - the navigation guard on every window: the app’s own places stay, web links open in the browser, the rest is refused;
- the update channel (
stable/beta) and the feed it reads.
Re-exports§
pub use krizaka_rust as kit;pub use tauri_plugin_dialog as dialog;
Structs§
- Builder
- The plugin, configured with the product’s own addresses.
- Kit
- The kit’s state in the app. A product’s own command reads it with
KitExt::kit.
Enums§
- Command
Error - A command’s failure.
Constants§
- CODES
- Every code a command may answer, with its message. The one place to read them (and to document them for the page).
- DRAGGING
- Files are being dragged over a window (
true), or no longer are (false): the page shows where to drop. - DROPPED
- Paths the system reports as dropped on a window, already allowed by the gate:
string[]. - FOLDER_
CHANGED - A watched folder whose content changed (debounced): its path,
string. - MENU
- The id of a menu item the person chose:
string. - OPEN
- A deep link’s route (
/app/rapports):string.
Traits§
- KitExt
app.kit()(orwindow.kit()) in a product’s command.
Functions§
- set_
menu - Sets the menu bar from Rust, for an app whose page cannot send it (a hosted app): the same checks as the command.
- take_
links - The routes of the deep links that arrived since the last call (the app may have been opened by one before the page
listened). The page listens to
krizaka://openfirst, then takes these.