diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 16:38:35 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2024-04-20 16:42:14 +0200 |
commit | 334f764cbffa8d591a007f0fec962f58cf0efde4 (patch) | |
tree | 3e6c4227b107693cd5d2298cd51cdaa015dda675 /crates/rebel-resolve/src/pin.rs | |
parent | edf1d5a5cea4bfb662696f3b5c24dbd95e1733c1 (diff) | |
download | rebel-334f764cbffa8d591a007f0fec962f58cf0efde4.tar rebel-334f764cbffa8d591a007f0fec962f58cf0efde4.zip |
Introduce rebel-resolve module
It would be nice to reduce the dependencies of the driver on the context
further, so more of rebel-resolve can become private.
Diffstat (limited to 'crates/rebel-resolve/src/pin.rs')
-rw-r--r-- | crates/rebel-resolve/src/pin.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/crates/rebel-resolve/src/pin.rs b/crates/rebel-resolve/src/pin.rs new file mode 100644 index 0000000..bffc940 --- /dev/null +++ b/crates/rebel-resolve/src/pin.rs @@ -0,0 +1,31 @@ +use std::collections::HashMap; + +use serde::{Deserialize, Serialize}; + +use rebel_common::string_hash::*; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Args { + pub host: Option<String>, + pub target: Option<String>, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Provides { + pub recipe: String, + pub task: String, + pub output: Vec<String>, + pub args: Args, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "kebab-case")] +pub struct Pin { + pub hash: Option<ArchiveHash>, + #[serde(default)] + pub provides: Vec<Provides>, + #[serde(default)] + pub is_rootfs: bool, +} + +pub type Pins = HashMap<String, Pin>; |