Skip to main content

parse_path_with_bytes

Function parse_path_with_bytes 

Source
pub fn parse_path_with_bytes(
    path: &Path,
) -> Result<(MachOImage, FileImage), LoadError>
Expand description

Like parse_path, but returns the full on-disk container as a crate::FileImage (prefer mmap, demand-paged).

Callers reuse that buffer for segment fill ([GuestMemory::map_image_bytes]) and bind (via thin_arm64_bytes) so large guests avoid a second disk pass and avoid forcing the entire multi‑hundred‑MiB file into RSS up front.

Fat containers: parse uses the full container so MachOSummary::file_slice_offset stays correct for map fileoff.