#[non_exhaustive]pub struct Assets {
pub bin: Option<String>,
pub prepare: Option<Vec<String>>,
pub build: Option<Vec<String>>,
pub binary: Option<String>,
pub dir: Option<PathBuf>,
pub files: Vec<PathBuf>,
pub generated: Vec<Generated>,
pub targets: BTreeMap<String, AssetTarget>,
}Expand description
Native GitHub Release tarballs, plus the recipe every target shares. Omit for libraries. Each named sub-mapping is one target.
A tarball contains the one binary, or the files packed from dir. Use
files when a release needs more than its binary, such as a second
executable, a service unit, or a licence. A target that ships other files
lists its own files, which replace the shared list for that target.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.bin: Option<String>The binary name. Defaults to the first package’s name.
prepare: Option<Vec<String>>Ran once per target before build. Stock rust recipe uses rustup.
build: Option<Vec<String>>How to produce the binary. Stock rust recipe is cargo build --release.
binary: Option<String>Path to the built binary, with {bin}, {triple}, {os}, and
{arch}. Omit for target/{triple}/release/{bin}. Unused when dir
and files specify what to pack, so it may not be set beside them.
dir: Option<PathBuf>The directory files are packed from, relative to the directory
containing .ctl/, with the same placeholders as binary. Omit, with
files, to pack the one binary.
files: Vec<PathBuf>Paths under dir packed into the tarball of every target that lists
none of its own, with the same placeholders. Each keeps its place under
dir. A directory is packed whole. Omit, with dir, to pack the one
binary, or when every target lists its own.
generated: Vec<Generated>Files written from a command’s output and packed into the tarball of every target beside the binary, such as a usage spec or a man page the built binary prints. Omit when the tarball contains nothing generated.
targets: BTreeMap<String, AssetTarget>Every remaining sub-mapping: assets.linux-x64 and friends. A typo’d
recipe key lands here and fails as an unknown target, loudly.
Config::load declares this field to ctl-core as flattened,
so a problem names assets.<id> and lands on that key’s line.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assets
impl<'de> Deserialize<'de> for Assets
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 Validate for Assets
impl Validate for Assets
Source§fn validate_into(
&self,
__garde_user_ctx: &Self::Context,
__garde_path: &mut dyn FnMut() -> Path,
__garde_report: &mut Report,
)
fn validate_into( &self, __garde_user_ctx: &Self::Context, __garde_path: &mut dyn FnMut() -> Path, __garde_report: &mut Report, )
Self, aggregating all validation errors into Report.