mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 21:00:20 +00:00
chore(crates): introduce new config crate for sprout configuration
This commit is contained in:
21
crates/config/src/generators/bls.rs
Normal file
21
crates/config/src/generators/bls.rs
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user