graphrt_bundle/
manifest.rs1use std::collections::BTreeMap;
4
5use serde::{Deserialize, Serialize};
6
7pub const BUNDLE_FORMAT_VERSION: u32 = 1;
9pub const MANIFEST_PATH: &str = "bundle.json";
11pub const SIGNATURE_PATH: &str = "bundle.sig";
13
14#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
16pub struct BundleManifest {
17 pub format_version: u32,
18 pub name: String,
19 pub version: String,
20 #[serde(default, skip_serializing_if = "String::is_empty")]
21 pub description: String,
22 pub created_at: String,
24 pub entry: String,
26 pub workflows: Vec<String>,
28 #[serde(default)]
29 pub requires: Requires,
30 pub files: BTreeMap<String, String>,
32}
33
34#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
36pub struct Requires {
37 #[serde(default, skip_serializing_if = "String::is_empty")]
39 pub graphrt: String,
40 #[serde(default)]
42 pub node_kinds: Vec<String>,
43 #[serde(default)]
45 pub plugins: Vec<PluginRef>,
46 #[serde(default)]
48 pub providers: Vec<String>,
49 #[serde(default)]
51 pub env: Vec<String>,
52}
53
54#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
56pub struct PluginRef {
57 pub name: String,
58 #[serde(default)]
59 pub version: String,
60 pub runtime: String,
62 pub portable: bool,
64 pub sha256: String,
66}