pub struct KernelBuilder { /* private fields */ }Expand description
Boots a kernel directly, no bootloader (bsdkrun kernel).
Implementations§
Source§impl KernelBuilder
impl KernelBuilder
Sourcepub fn port(self, forward: impl Into<String>) -> Self
pub fn port(self, forward: impl Into<String>) -> Self
Add a host->guest TCP port forward, "HOST:GUEST".
Sourcepub fn forward(self, host: u16, guest: u16) -> Self
pub fn forward(self, host: u16, guest: u16) -> Self
Add a port forward from numbers instead of a string.
Sourcepub fn log_level(self, level: u32) -> Self
pub fn log_level(self, level: u32) -> Self
bsdkrun’s global --log-level for the create call (default 1, so
boot diagnostics land in the error when a boot fails).
Sourcepub fn to_args(&self) -> Vec<String>
pub fn to_args(&self) -> Vec<String>
The exact argv create() will run (minus the binary and global
flags) — for inspection and tests.
Sourcepub fn volume(self, name: impl Into<String>) -> Self
pub fn volume(self, name: impl Into<String>) -> Self
Use a persistent CoW volume as the root disk (-v).
Sourcepub fn attach_disk(self, disk: impl Into<String>) -> Self
pub fn attach_disk(self, disk: impl Into<String>) -> Self
Attach an extra raw disk, "PATH" or "PATH:ro" (--attach-disk).
Sourcepub fn format(self, format: impl Into<String>) -> Self
pub fn format(self, format: impl Into<String>) -> Self
Kernel image format (--format, e.g. "elf").
Trait Implementations§
Source§impl Clone for KernelBuilder
impl Clone for KernelBuilder
Source§fn clone(&self) -> KernelBuilder
fn clone(&self) -> KernelBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KernelBuilder
impl RefUnwindSafe for KernelBuilder
impl Send for KernelBuilder
impl Sync for KernelBuilder
impl Unpin for KernelBuilder
impl UnsafeUnpin for KernelBuilder
impl UnwindSafe for KernelBuilder
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