chore(crates): introduce new config crate for sprout configuration

This commit is contained in:
2025-11-02 23:28:31 -05:00
parent ccc75a2e14
commit ed3bfb77c4
39 changed files with 452 additions and 379 deletions

View File

@@ -0,0 +1,21 @@
use crate::entries::EntryDeclaration;
use serde::{Deserialize, Serialize};
/// The default path to the BLS directory.
const BLS_TEMPLATE_PATH: &str = "\\loader";
/// The configuration of the BLS generator.
/// The BLS uses the Bootloader Specification to produce
/// entries from an input template.
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
pub struct BlsConfiguration {
/// The entry to use for as a template.
pub entry: EntryDeclaration,
/// The path to the BLS directory.
#[serde(default = "default_bls_path")]
pub path: String,
}
fn default_bls_path() -> String {
BLS_TEMPLATE_PATH.to_string()
}