Skip to main content

PackManifest

Struct PackManifest 

Source
pub struct PackManifest {
Show 19 fields pub mode: PackMode, pub image: String, pub digest: String, pub platform: String, pub entrypoint: Vec<String>, pub cmd: Vec<String>, pub env: Vec<String>, pub secret_refs: BTreeMap<String, SecretRef>, pub workdir: Option<String>, pub cpus: u8, pub mem: u32, pub image_size: u64, pub network: bool, pub gpu: bool, pub cuda: bool, pub host_platform: String, pub created: String, pub smolvm_version: String, pub assets: AssetInventory,
}
Expand description

Manifest describing the packed image and configuration.

Fields§

§mode: PackMode

Execution mode (container or VM).

§image: String

Original image reference (e.g., “alpine:latest”).

§digest: String

Image digest (sha256:…).

§platform: String

Target platform (e.g., “linux/arm64”).

§entrypoint: Vec<String>

Entrypoint command (from image config or override).

§cmd: Vec<String>

Default command arguments (from image config or override).

§env: Vec<String>

Default environment variables.

§secret_refs: BTreeMap<String, SecretRef>

Secret references carried with the pack. Each maps an env var name to a reference (host store entry, host env var, or file) — never an inline value. The plaintext is resolved on the run host at exec time, so a .smolmachine never contains secret material at rest.

§workdir: Option<String>

Working directory (from image config or override).

§cpus: u8

Default number of vCPUs.

§mem: u32

Default memory in MiB.

§image_size: u64

Total extracted (on-disk) image size in bytes. Used to auto-size the storage disk at runtime.

§network: bool

Whether outbound networking is enabled by default.

§gpu: bool

Enable GPU acceleration (Vulkan via virtio-gpu).

§cuda: bool

Enable CUDA-over-vsock: the runtime starts a host CUDA server and bridges the guest’s CUDA client to it. Preserved from the source VM’s cuda flag when packing --from-vm. #[serde(default)] keeps older sidecars (which lack the field) loadable.

§host_platform: String

Host platform this .smolmachine runs on (e.g., “darwin/arm64”). Distinct from platform which is the guest architecture (always linux). Used for registry Image Index resolution. #[serde(default)] keeps pre-reset packs (which predate this field) loadable — a local run selects libs by the actual host, so an empty value is harmless.

§created: String

RFC 3339 timestamp when this machine was packed. Defaulted so older packs that lack it still load.

§smolvm_version: String

smolvm version that built this machine (e.g., “0.1.15”). Defaulted so older packs that lack it still load.

§assets: AssetInventory

Asset inventory - files included in the assets blob.

Implementations§

Source§

impl PackManifest

Source

pub fn new( image: String, digest: String, platform: String, host_platform: String, ) -> Self

Create a new manifest with default values.

Source

pub fn to_json(&self) -> Result<Vec<u8>>

Serialize manifest to JSON.

Source

pub fn from_json(data: &[u8]) -> Result<Self>

Deserialize manifest from JSON.

Trait Implementations§

Source§

impl Clone for PackManifest

Source§

fn clone(&self) -> PackManifest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PackManifest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PackManifest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PackManifest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more