Skip to main content

install

Function install 

Source
pub fn install(
    proj_dirs: &ProjectDirs,
    spec: InstallSpec,
    alias_override: Option<&str>,
    cdylib_name_override: Option<&str>,
    overwrite: bool,
) -> Result<PluginDescriptor, String>
Expand description

Install a routine into the cotis-cli cache.

Builds or downloads the cdylib, copies it to the cache, validates the plugin ABI, writes descriptor.json, and runs cotis_plugin_finish_installation when requested by the descriptor.

alias_override sets the routine cache name for path: and gh: installs (ignored for crate:). cdylib_name_override overrides cargo metadata cdylib detection for path: and crate: only.

ยงErrors

Returns an error for missing paths, failed cargo builds, HTTP failures, missing cdylib artifacts, already-installed routines (when overwrite is false), incompatible plugins, or failed finish-installation hooks.