pub struct SnapcraftConfig {Show 26 fields
pub id: Option<String>,
pub ids: Option<Vec<String>>,
pub name: Option<String>,
pub title: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub icon: Option<String>,
pub base: Option<String>,
pub grade: Option<String>,
pub license: Option<String>,
pub publish: Option<bool>,
pub channel_templates: Option<Vec<String>>,
pub confinement: Option<String>,
pub plugs: Option<BTreeMap<String, Value>>,
pub assumes: Option<Vec<String>>,
pub apps: Option<BTreeMap<String, SnapcraftApp>>,
pub layout: Option<BTreeMap<String, SnapcraftLayout>>,
pub extra_files: Option<Vec<SnapcraftExtraFileSpec>>,
pub templated_extra_files: Option<Vec<TemplatedExtraFile>>,
pub name_template: Option<String>,
pub skip: Option<StringOrBool>,
pub replace: Option<bool>,
pub mod_timestamp: Option<String>,
pub hooks: Option<BTreeMap<String, Value>>,
pub if_condition: Option<String>,
pub required: Option<bool>,
}Fields§
§id: Option<String>Unique identifier for this snapcraft config.
ids: Option<Vec<String>>Build IDs to include. Empty means all builds.
name: Option<String>Snap package name in the store.
title: Option<String>Canonical application title (user-facing in store).
summary: Option<String>Single-line elevator pitch (max 79 characters).
description: Option<String>Extended description (user-facing in store).
icon: Option<String>Path to the snap icon image (.png or .svg).
When set, anodizer copies the file to meta/gui/<name>.<ext> inside
the staged prime directory before snapcraft pack runs. The icon is
delivered to the Snap Store via snapcraft’s GUI metadata channel and
never appears in snap.json, keeping uploads schema-clean. (The Snap
Store rejects snap.json that contains an icon: key with
“Additional properties are not allowed (‘icon’ was unexpected)”.)
The source path may be absolute or relative to the project root. Anodizer errors before staging if the file does not exist.
base: Option<String>Runtime base snap: core, core18, core20, core22, core24, bare.
grade: Option<String>Release stability level: stable, devel.
license: Option<String>License identifier (SPDX format).
publish: Option<bool>Whether to publish to the snapcraft store.
channel_templates: Option<Vec<String>>Distribution channels: edge, beta, candidate, stable.
confinement: Option<String>Security confinement level: strict, devmode, classic.
plugs: Option<BTreeMap<String, Value>>Top-level snap plug definitions (structured map).
Keys are plug names, values are either null (simple plug) or an object
with interface and optional attributes (e.g. { interface: "content", target: "$SNAP/shared" }).
An arbitrary key/value map for this field.
assumes: Option<Vec<String>>Required snapd features/versions.
apps: Option<BTreeMap<String, SnapcraftApp>>Application configurations defining daemons, commands, env vars.
layout: Option<BTreeMap<String, SnapcraftLayout>>Directory mappings for sandbox accessibility.
Accepts the legacy plural layouts: spelling via serde alias for
back-compat with imported configs.
extra_files: Option<Vec<SnapcraftExtraFileSpec>>Additional static files to bundle (string shorthand or structured form).
templated_extra_files: Option<Vec<TemplatedExtraFile>>Extra files whose contents are rendered through the template engine before bundling.
Unlike extra_files which copy as-is, template variables like {{ Tag }} are expanded.
name_template: Option<String>Template for the output snap filename.
skip: Option<StringOrBool>Skip this snapcraft config. Accepts bool or template string
(e.g. "{{ if .IsSnapshot }}true{{ endif }}" for conditional skip).
Accepts the legacy disable: spelling via serde alias for back-compat.
replace: Option<bool>Remove source archives from artifacts, keeping only snap.
mod_timestamp: Option<String>Output timestamp for reproducible builds.
hooks: Option<BTreeMap<String, Value>>Snap hooks — maps hook name to arbitrary hook config.
if_condition: Option<String>Template-conditional gate: when the rendered result is falsy
("false" / "0" / "no" / empty), the snapcraft config is
skipped. Render failure hard-errors. The
snapcrafts[].if:. Distinct from skip: (always-skip predicate).
required: Option<bool>When true, a failed snap upload counts as a required-publisher
failure: trips the submitter gate and surfaces in
report.required_failures() so the CLI exits non-zero.
Default: false — a failed snap upload does not abort the pipeline.
It is still reported as a post-publish landing issue by
verify-release regardless of this setting: required governs only
whether the run ABORTS mid-pipeline, never whether an attempted
failure gets certified as a clean release.
When multiple snapcraft configs exist, the stage records ONE
aggregated PublisherResult: required = true if ANY config opted
in.
Trait Implementations§
Source§impl Clone for SnapcraftConfig
impl Clone for SnapcraftConfig
Source§fn clone(&self) -> SnapcraftConfig
fn clone(&self) -> SnapcraftConfig
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 SnapcraftConfig
impl Debug for SnapcraftConfig
Source§impl Default for SnapcraftConfig
impl Default for SnapcraftConfig
Source§fn default() -> SnapcraftConfig
fn default() -> SnapcraftConfig
Source§impl<'de> Deserialize<'de> for SnapcraftConfigwhere
SnapcraftConfig: Default,
impl<'de> Deserialize<'de> for SnapcraftConfigwhere
SnapcraftConfig: 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 SnapcraftConfig
impl JsonSchema for SnapcraftConfig
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