Skip to main content

Crate tauri_plugin_phyto

Crate tauri_plugin_phyto 

Source
Expand description

tauri-plugin-phyto is split into two feature-gated halves:

  • runtime (default) — the actual Tauri plugin: HTTP automation server, IPC commands, init, PhytoConfig, PROTOCOL_VERSION. This is what consumers wire into their Tauri builder.
  • buildstd-only helpers for consumer build scripts. The single entry point [build::sync_capability] creates / removes the Phyto capability JSON so tauri-build doesn’t reject capabilities that reference an unregistered plugin when the e2e feature is off. Enable from [build-dependencies] with default-features = false, features = ["build"] to keep the host compile graph small.

Structs§

PendingCallbacks
Shared state for pending command callbacks. Wrapped in Arc so both the HTTP server thread and Tauri command can share it.
PhytoConfig
Configuration for the Phyto automation server.

Constants§

PROTOCOL_VERSION
Wire protocol version. Kept manually in lockstep with the PROTOCOL_VERSION constants in crates/phyto-core/src/protocol.rs and the TS packages. The driver fetches this via GET /info and exits cleanly on mismatch — see packages/driver-tauri/src/index.ts. Bump only on breaking wire-format changes.

Functions§

init
Initialize the Phyto plugin.