pub struct BootSynthesizer {
pub init_binary_path: String,
pub vm_override: Option<VmSpec>,
pub out_prefix: String,
pub busybox: bool,
}Expand description
Multi-file emitter for a full boot artifact set.
Input: one tatara-os SystemConfig (typically parsed from (defsystem …)).
Output: every file a user needs to reach vfkit --config vm.json:
vm.json/boot.sh— the VmSpec rendered for vfkitkernel.nix/initrd.nix— standalone Nix expressions thatnix build -f kernel.nix(etc.) realize into/nix/storepathsinit.lisp— the supervisor config baked into the initrdsystem.json— the typed config, re-serialized for auditREADME.md— the boot instructions, keyed to the guest spec
Fields§
§init_binary_path: StringPath we presume tatara-init will live at inside the guest. Used only
when the init binary hasn’t been realized yet — real deployments
substitute a /nix/store/...-tatara-init/bin/tatara-init path.
vm_override: Option<VmSpec>VmSpec overrides (cpus, memory, shares). If None, defaults by hostname.
out_prefix: StringOutput prefix for all emitted files. Artifact paths are relative.
busybox: boolInclude busybox + applets in the initrd. Default true (matches LinuxRootfs default); set false when building on a non-Linux host without a linux-builder (e.g. naive Darwin-only dev flow).
Implementations§
Source§impl BootSynthesizer
impl BootSynthesizer
pub fn new() -> Self
pub fn with_init_binary_path(self, p: impl Into<String>) -> Self
pub fn with_out_prefix(self, p: impl Into<String>) -> Self
pub fn with_vm_override(self, vm: VmSpec) -> Self
pub fn with_busybox(self, on: bool) -> Self
Trait Implementations§
Source§impl Default for BootSynthesizer
impl Default for BootSynthesizer
Source§impl MultiSynthesizer for BootSynthesizer
impl MultiSynthesizer for BootSynthesizer
type Input = SystemConfig
fn generate_all(&self, cfg: &SystemConfig) -> Vec<Artifact>
Auto Trait Implementations§
impl Freeze for BootSynthesizer
impl RefUnwindSafe for BootSynthesizer
impl Send for BootSynthesizer
impl Sync for BootSynthesizer
impl Unpin for BootSynthesizer
impl UnsafeUnpin for BootSynthesizer
impl UnwindSafe for BootSynthesizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more