libsdbootconf

Crates.iolibsdbootconf
lib.rslibsdbootconf
version0.11.2
sourcesrc
created_at2022-04-05 03:36:26.177696
updated_at2023-05-09 23:35:44.935931
descriptionA systemd-boot configuration and boot entry configuration parser library
homepage
repositoryhttps://github.com/OriginCode/libsdbootconf
max_upload_size
id562410
size28,077
Kaiyang Wu (OriginCode)

documentation

README

libsdbootconf

crates.io docs.rs MIT licensed

A systemd-boot configuration and boot entry configuration parser library.

Usage

use libsdbootconf::{config::ConfigBuilder, entry::EntryBuilder, SystemdBootConfBuilder};

let systemd_boot_conf = SystemdBootConfBuilder::new("/efi/loader")
    .config(ConfigBuilder::new()
        .default("5.12.0-aosc-main")
        .timeout(5u32)
        .build())
    .entry(EntryBuilder::new("5.12.0-aosc-main")
        .title("AOSC OS x86_64 (5.12.0-aosc-main)")
        .version("5.12.0-aosc-main")
        .build())
    .build();

systemd_boot_conf.write_all().unwrap();
Commit count: 52

cargo fmt