pub struct BuildConfig {Show 18 fields
pub id: Option<String>,
pub binary: Option<String>,
pub skip: Option<StringOrBool>,
pub targets: Option<Vec<String>>,
pub features: Option<Vec<String>>,
pub no_default_features: Option<bool>,
pub env: Option<HashMap<String, HashMap<String, String>>>,
pub copy_from: Option<String>,
pub flags: Option<Vec<String>>,
pub reproducible: Option<bool>,
pub hooks: Option<BuildHooksConfig>,
pub ignore: Option<Vec<BuildIgnore>>,
pub overrides: Option<Vec<BuildOverride>>,
pub cross_tool: Option<String>,
pub mod_timestamp: Option<String>,
pub command: Option<String>,
pub no_unique_dist_dir: Option<StringOrBool>,
pub legacy_gobinary: Option<String>,
}Fields§
§id: Option<String>Unique identifier for this build, used to reference it from archives and other configs.
binary: Option<String>Binary name to build (must match a Cargo binary target in the crate).
Optional so that defaults.builds (a path-mirrored template that
applies to every crate) can omit binary — the per-crate builds[]
entry supplies it. When the binary is absent at the per-crate level
it falls back to the crate’s name field.
skip: Option<StringOrBool>When true (or template evaluating to “true”), skip this build entirely.
targets: Option<Vec<String>>Target triples to build for. When set, REPLACES defaults.targets
for this build (override semantics — the per-build value wins
outright, no concat). When None, this build inherits
defaults.targets verbatim. Both cli::commands::helpers:: collect_build_targets and stage-build enforce this rule.
features: Option<Vec<String>>Cargo features to enable for this build.
no_default_features: Option<bool>When true, pass –no-default-features to cargo build.
env: Option<HashMap<String, HashMap<String, String>>>Per-target environment variables keyed as {target: {KEY: VALUE}}.
copy_from: Option<String>Copy the binary from another build ID instead of building it.
flags: Option<Vec<String>>Extra flags passed to cargo build, one per list entry (e.g., ["--release", "--locked"]).
Each entry is template-rendered then passed verbatim as a single argv
token — there is no sh -c step and no shell tokenization, so a
rendered value containing spaces stays one argv entry (it is NOT
re-split). Use one list entry per flag, including the flag and its
value as separate entries (["--target-dir", "/tmp/{{ .Version }}"])
when the value itself may contain spaces.
reproducible: Option<bool>When true, enable reproducible builds by stripping timestamps.
hooks: Option<BuildHooksConfig>Per-build hooks executed before and after compilation.
ignore: Option<Vec<BuildIgnore>>Exclude specific os/arch combinations from this build’s target matrix.
Falls back to defaults.builds.ignore when not set.
overrides: Option<Vec<BuildOverride>>Per-target overrides for env, flags, and features for this build.
Falls back to defaults.builds.overrides when not set.
cross_tool: Option<String>Override the cross-compilation tool binary path (e.g., a custom cross wrapper).
When set, this binary is used instead of cargo/cross/zigbuild.
mod_timestamp: Option<String>Override the modification timestamp of built binaries for reproducible builds.
Template string (e.g. "{{ .CommitTimestamp }}") or unix timestamp.
command: Option<String>Override the cargo subcommand (default: auto-detected “build” or “zigbuild”).
Enables e.g. cargo auditable build by setting command: "auditable build".
no_unique_dist_dir: Option<StringOrBool>When true (or template evaluating to “true”), place binaries in flat dist/ instead of dist/{target}/. Overrides the crate-level setting.
legacy_gobinary: Option<String>Deprecated: GoReleaser’s gobinary: field selects the cargo-like build
command (named after go build). Anodizer’s tool is always cargo,
so the field is captured for back-compat YAML import only and
apply_build_legacy_aliases emits a deprecation warning at config-load
time. GR ref: internal/pipe/build/build.go:93-95.
Trait Implementations§
Source§impl Clone for BuildConfig
impl Clone for BuildConfig
Source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
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 BuildConfig
impl Debug for BuildConfig
Source§impl Default for BuildConfig
impl Default for BuildConfig
Source§fn default() -> BuildConfig
fn default() -> BuildConfig
Source§impl<'de> Deserialize<'de> for BuildConfigwhere
BuildConfig: Default,
impl<'de> Deserialize<'de> for BuildConfigwhere
BuildConfig: 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 BuildConfig
impl JsonSchema for BuildConfig
Source§fn schema_name() -> String
fn schema_name() -> String
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 is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more