pub struct SectionHeader {
pub manifest_size: u32,
pub assets_size: u64,
pub checksum: u32,
}Expand description
Header for data embedded in the __SMOLVM,__smolvm Mach-O section.
This format is used for macOS single-file binaries where assets are stored inside the executable’s Mach-O structure, allowing proper code signing.
Layout (32 bytes total):
Offset Size Field
0 8 magic ("SMOLSECT")
8 4 version (u32 LE)
12 4 manifest_size (u32 LE)
16 8 assets_size (u64 LE)
24 4 checksum (u32 LE)
28 4 reserved (zeroes)Following the header:
- Manifest JSON (manifest_size bytes)
- Compressed assets (assets_size bytes)
Fields§
§manifest_size: u32Size of manifest JSON in bytes.
assets_size: u64Size of compressed assets in bytes.
checksum: u32CRC32 checksum of manifest + assets.
Implementations§
Trait Implementations§
Source§impl Clone for SectionHeader
impl Clone for SectionHeader
Source§fn clone(&self) -> SectionHeader
fn clone(&self) -> SectionHeader
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 moreimpl Copy for SectionHeader
Auto Trait Implementations§
impl Freeze for SectionHeader
impl RefUnwindSafe for SectionHeader
impl Send for SectionHeader
impl Sync for SectionHeader
impl Unpin for SectionHeader
impl UnsafeUnpin for SectionHeader
impl UnwindSafe for SectionHeader
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