1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Installation: turning a plugin crate on crates.io into a loadable cdylib plus
//! its manifest on disk.
//!
//! Two routes, chosen by [`crate::CratePluginKit::install`] based on
//! [`crate::KitConfig::prefer_prebuilt`]:
//!
//! ```text
//! prefer_prebuilt = true
//! └─ prebuilt::try_install ──(no prebuilt published / cannot download)──> build_host::install
//! prefer_prebuilt = false
//! └─ build_host::install
//! ```
//!
//! build-host is the default and the fallback: it goes through `cargo build` and
//! therefore uses whatever registry or mirror the user has configured. prebuilt
//! downloads from GitHub bypass those settings, so it is only an accelerator.
use PathBuf;
use crateInstallSource;
/// The artifact of one successful install.
/// Removes a directory (treating a missing one as success).
pub