pub struct BinstallConfig {
pub enabled: Option<bool>,
pub pkg_url: Option<String>,
pub bin_dir: Option<String>,
pub pkg_fmt: Option<String>,
pub overrides: Option<BTreeMap<String, BinstallOverride>>,
}Fields§
§enabled: Option<bool>When true, write [package.metadata.binstall] into the crate’s
Cargo.toml so cargo binstall can install prebuilt release archives.
§Auto-derivation
With enabled: true and no pkg_url and no overrides,
anodize fills in correct per-target metadata automatically: for every
configured build target it emits an
overrides.<rust-triple> whose pkg_url is the GitHub release download
URL for that target’s archive, with the asset name rendered through the
same archive.name_template the archive stage uses (so the URL can
never drift from the asset the release uploads) and the version
positions expressed as cargo-binstall’s own { version } token. The
matching pkg_fmt (tar.gz→tgz, zip→zip, …) is set per target.
binstall:
enabled: true # nothing else requiredpkg_url: Option<String>Custom download URL template for cargo-binstall (supports templates).
Setting this (or any overrides entry) disables
auto-derivation — anodize writes your value verbatim and computes
nothing. Use it only when the auto-derived per-target URLs don’t fit
(manual values always win).
bin_dir: Option<String>Directory within the archive where binaries are located.
pkg_fmt: Option<String>Package format hint for cargo-binstall: tgz, tar.gz, tar.xz, zip, bin, etc.
overrides: Option<BTreeMap<String, BinstallOverride>>Per-target overrides keyed by Rust target triple
(e.g. x86_64-unknown-linux-gnu). Each entry overrides
pkg_url/pkg_fmt/bin_dir for the matching triple, emitted as a
[package.metadata.binstall.overrides.<triple>] sub-table.
You rarely need to set this by hand: with enabled: true and no
pkg_url/overrides, anodize auto-derives a correct per-target
override for every build target (see enabled).
Supplying any override here (like supplying pkg_url)
disables auto-derivation and takes full manual control of the table.
Trait Implementations§
Source§impl Clone for BinstallConfig
impl Clone for BinstallConfig
Source§fn clone(&self) -> BinstallConfig
fn clone(&self) -> BinstallConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BinstallConfig
impl Debug for BinstallConfig
Source§impl Default for BinstallConfig
impl Default for BinstallConfig
Source§fn default() -> BinstallConfig
fn default() -> BinstallConfig
Source§impl<'de> Deserialize<'de> for BinstallConfigwhere
BinstallConfig: Default,
impl<'de> Deserialize<'de> for BinstallConfigwhere
BinstallConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for BinstallConfig
impl JsonSchema for BinstallConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more