Skip to main content

Module Extension

Module Extension 

Source
Expand description

Extension-management IPC handler atoms. One pub async fn per file; file name mirrors the exported function name. Dispatcher in WindServiceHandlers/mod.rs routes extensions:install and extensions:uninstall into these atoms.

Helpers (NotifyCocoonDeltaExtensions, UserExtensionDirectory, VsixPathFromArgs) live in their own atoms so the three fns they support can import them individually and future handlers reuse the same code without the transitive-import ballooning a parent file.

Modules§

ExtensionInstall
extensions:install IPC handler - local VSIX only. Gallery installs are declined (Land has no marketplace backend) and return null.
ExtensionUninstall
extensions:uninstall IPC handler - removes the install directory, clears the registry entry, and notifies Cocoon + Wind. Symmetric with ExtensionInstall.
NotifyCocoonDeltaExtensions
Post-install/uninstall Cocoon notification.
UserExtensionDirectory
User-scope install destination for VSIX unpacks. Matches the user-scope scan path in Binary/Extension/ScanPathConfigure.rs so VSIX-installed extensions are discovered on the next Mountain boot without a sync step.
VsixPathFromArgs
Extract a filesystem path from the first arg of extensions:install. Wind’s install dialog hands us either a raw string (“file:///…” or absolute path) or a Tauri-serialised UriComponents object; both forms collapse to a single PathBuf here. None when the arg is missing, malformed, or carries a non-file scheme.