pub struct Manifest {
pub bundle_version: String,
pub plugin: PluginInfo,
pub platforms: HashMap<String, PlatformInfo>,
pub build_info: Option<BuildInfo>,
pub sbom: Option<Sbom>,
pub schema_checksum: Option<String>,
pub notices: Option<String>,
pub api: Option<ApiInfo>,
pub public_key: Option<String>,
pub schemas: HashMap<String, SchemaInfo>,
}Expand description
Bundle manifest - the main descriptor for a plugin bundle.
This corresponds to the manifest.json file in the bundle root.
Fields§
§bundle_version: StringBundle format version (e.g., “1.0”).
plugin: PluginInfoPlugin metadata.
platforms: HashMap<String, PlatformInfo>Platform-specific library information. Key is the platform string (e.g., “linux-x86_64”).
build_info: Option<BuildInfo>Build information (optional). Contains metadata about when/how the bundle was built.
sbom: Option<Sbom>SBOM (Software Bill of Materials) paths.
schema_checksum: Option<String>Combined checksum of all schema files. Used to verify schema compatibility when combining bundles.
notices: Option<String>Path to license notices file within the bundle.
api: Option<ApiInfo>API information (optional).
public_key: Option<String>Minisign public key for signature verification (base64-encoded). Format: “RWS…” (standard minisign public key format).
schemas: HashMap<String, SchemaInfo>Schema files embedded in the bundle.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn new(name: &str, version: &str) -> Self
pub fn new(name: &str, version: &str) -> Self
Create a new manifest with minimal required fields.
Sourcepub fn add_platform(
&mut self,
platform: Platform,
library_path: &str,
checksum: &str,
)
pub fn add_platform( &mut self, platform: Platform, library_path: &str, checksum: &str, )
Add a platform with a release variant to the manifest.
This is a convenience method that adds the library as the release variant.
For multiple variants, use add_platform_variant instead.
Sourcepub fn add_platform_variant(
&mut self,
platform: Platform,
variant: &str,
library_path: &str,
checksum: &str,
build: Option<Value>,
)
pub fn add_platform_variant( &mut self, platform: Platform, variant: &str, library_path: &str, checksum: &str, build: Option<Value>, )
Add a specific variant to a platform.
If the platform doesn’t exist, it will be created.
Sourcepub fn set_public_key(&mut self, public_key: String)
pub fn set_public_key(&mut self, public_key: String)
Set the public key for signature verification.
Sourcepub fn add_schema(
&mut self,
name: String,
path: String,
format: String,
checksum: String,
description: Option<String>,
)
pub fn add_schema( &mut self, name: String, path: String, format: String, checksum: String, description: Option<String>, )
Add a schema file to the manifest.
Sourcepub fn set_build_info(&mut self, build_info: BuildInfo)
pub fn set_build_info(&mut self, build_info: BuildInfo)
Set the build information.
Sourcepub fn get_build_info(&self) -> Option<&BuildInfo>
pub fn get_build_info(&self) -> Option<&BuildInfo>
Get the build information.
Sourcepub fn set_schema_checksum(&mut self, checksum: String)
pub fn set_schema_checksum(&mut self, checksum: String)
Set the schema checksum for bundle combining validation.
Sourcepub fn get_schema_checksum(&self) -> Option<&str>
pub fn get_schema_checksum(&self) -> Option<&str>
Get the schema checksum.
Sourcepub fn set_notices(&mut self, path: String)
pub fn set_notices(&mut self, path: String)
Set the notices file path.
Sourcepub fn get_notices(&self) -> Option<&str>
pub fn get_notices(&self) -> Option<&str>
Get the notices file path.
Sourcepub fn get_variant(
&self,
platform: Platform,
variant: Option<&str>,
) -> Option<&VariantInfo>
pub fn get_variant( &self, platform: Platform, variant: Option<&str>, ) -> Option<&VariantInfo>
Get a specific variant for a platform.
Returns the release variant if variant is None.
Sourcepub fn get_release_variant(&self, platform: Platform) -> Option<&VariantInfo>
pub fn get_release_variant(&self, platform: Platform) -> Option<&VariantInfo>
Get the release variant for a platform (default).
Sourcepub fn list_variants(&self, platform: Platform) -> Vec<&str>
pub fn list_variants(&self, platform: Platform) -> Vec<&str>
List all variants for a platform.
Sourcepub fn get_platform(&self, platform: Platform) -> Option<&PlatformInfo>
pub fn get_platform(&self, platform: Platform) -> Option<&PlatformInfo>
Get platform info for a specific platform.
Sourcepub fn supports_platform(&self, platform: Platform) -> bool
pub fn supports_platform(&self, platform: Platform) -> bool
Check if a platform is supported.
Sourcepub fn supported_platforms(&self) -> Vec<Platform>
pub fn supported_platforms(&self) -> Vec<Platform>
Get all supported platforms.
Sourcepub fn validate(&self) -> BundleResult<()>
pub fn validate(&self) -> BundleResult<()>
Validate the manifest.
Sourcepub fn to_json(&self) -> BundleResult<String>
pub fn to_json(&self) -> BundleResult<String>
Serialize to JSON.
Sourcepub fn from_json(json: &str) -> BundleResult<Self>
pub fn from_json(json: &str) -> BundleResult<Self>
Deserialize from JSON.