pub struct SnapcraftConfig {Show 24 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<HashMap<String, Value>>,
pub assumes: Option<Vec<String>>,
pub apps: Option<HashMap<String, SnapcraftApp>>,
pub layouts: Option<HashMap<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<HashMap<String, Value>>,
}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 icon image file.
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<HashMap<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" }).
GoReleaser uses map[string]any for this field.
assumes: Option<Vec<String>>Required snapd features/versions.
apps: Option<HashMap<String, SnapcraftApp>>Application configurations defining daemons, commands, env vars.
layouts: Option<HashMap<String, SnapcraftLayout>>Directory mappings for sandbox accessibility.
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.
GoReleaser Pro feature.
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
with imported GoReleaser configs (GR’s snapcraft config field is
pkg/config/config.go:1033 Disable string).
replace: Option<bool>Remove source archives from artifacts, keeping only snap.
mod_timestamp: Option<String>Output timestamp for reproducible builds.
hooks: Option<HashMap<String, Value>>Snap hooks — maps hook name to arbitrary hook config.
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_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