euv-core 0.51.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
/// 7-byte ASCII prefix identifying every uncompressed Blender `.blend` file.
pub const BLEND_MAGIC: &[u8; 7] = b"BLENDER";

/// Classic Blender 2.x-4.x `.blend` file header length in bytes.
pub const BLEND_CLASSIC_HEADER_BYTES: usize = 12;

/// Blender 5.0+ large `.blend` file header length in bytes (`BLENDER17-01v0500`).
pub const BLEND_LARGE_HEADER_BYTES: usize = 17;

/// Blender 5.0+ `LargeBHead8` file block header size in bytes (`code`, `sdna_nr`, `old`, `len`, `nr`).
pub const BLEND_LARGE_BHEAD_BYTES: usize = 32;

/// Classic 64-bit `BHead8` file block header size in bytes.
pub const BLEND_CLASSIC_BHEAD8_BYTES: usize = 24;

/// Classic 32-bit `BHead4` file block header size in bytes.
pub const BLEND_CLASSIC_BHEAD4_BYTES: usize = 20;

/// Gzip container two-byte signature (`0x1F 0x8B`).
pub(crate) const BLEND_GZIP_MAGIC: [u8; 2] = [0x1f, 0x8b];

/// Zstandard container four-byte signature (`0x28 0xB5 0x2F 0xFD`).
pub(crate) const BLEND_ZSTD_MAGIC: [u8; 4] = [0x28, 0xb5, 0x2f, 0xfd];

/// Four-byte `DNA1` file-block code carrying Blender SDNA schema definitions.
pub(crate) const BLEND_CODE_DNA1: [u8; 4] = *b"DNA1";

/// Four-byte `ENDB` file-block code terminating a `.blend` stream.
pub(crate) const BLEND_CODE_ENDB: [u8; 4] = *b"ENDB";

/// Four-byte `SDNA` magic starting the payload of a `DNA1` block.
pub(crate) const BLEND_SDNA_MAGIC: [u8; 4] = *b"SDNA";

/// Four-byte `NAME` subsection tag inside `DNA1`.
pub(crate) const BLEND_SDNA_NAME: [u8; 4] = *b"NAME";

/// Four-byte `TYPE` subsection tag inside `DNA1`.
pub(crate) const BLEND_SDNA_TYPE: [u8; 4] = *b"TYPE";

/// Four-byte `TLEN` subsection tag inside `DNA1`.
pub(crate) const BLEND_SDNA_TLEN: [u8; 4] = *b"TLEN";

/// Four-byte `STRC` subsection tag inside `DNA1`.
pub(crate) const BLEND_SDNA_STRC: [u8; 4] = *b"STRC";

/// Field prefix matched inside SDNA `ID` struct to dynamically resolve `ID.name` byte offset.
pub(crate) const BLEND_SDNA_FIELD_NAME_PREFIX: &str = "name[";

/// Maximum safety cap on `.blend` blocks walked in a single inspection pass.
pub(crate) const BLEND_MAX_BLOCK_COUNT: usize = 2_000_000;

/// Default byte offset of `ID.name` in 64-bit Blender structs when `DNA1` omits `ID` (`next*8 + prev*8`).
pub(crate) const BLEND_DEFAULT_ID_NAME_OFFSET_64: usize = 16;

/// Default byte offset of `ID.name` in 32-bit Blender structs when `DNA1` omits `ID` (`next*4 + prev*4`).
pub(crate) const BLEND_DEFAULT_ID_NAME_OFFSET_32: usize = 8;

/// Error returned when a `.blend` input buffer is shorter than the minimum header length.
pub(crate) const ERR_BLEND_TOO_SHORT: &str = "blend: file shorter than BLENDER header";

/// Error returned when the decompressed `.blend` payload does not start with `BLENDER`.
pub(crate) const ERR_BLEND_BAD_MAGIC: &str = "blend: invalid BLENDER magic signature";

/// Error returned when a `.blend` file is compressed with Zstandard (unsupported without external zstd codec).
pub(crate) const ERR_BLEND_ZSTD_UNSUPPORTED: &str = "blend: zstd-compressed .blend detected; re-save uncompressed or gzip-compressed or export via Blender CLI";

/// Error returned when the `.blend` header pointer/endianness/version bytes are invalid.
pub(crate) const ERR_BLEND_MALFORMED_HEADER: &str = "blend: malformed header metadata fields";

/// Warning recorded when a `.blend` stream terminates before encountering an `ENDB` block.
pub(crate) const WARN_BLEND_MISSING_ENDB: &str = "blend: stream ended before ENDB terminator block";

/// Warning recorded when a `BHead` block payload length exceeds remaining buffer bytes.
pub(crate) const WARN_BLEND_TRUNCATED_BLOCK: &str = "blend: truncated block payload encountered";

/// Warning recorded when a `DNA1` schema block is missing or truncated.
pub(crate) const WARN_BLEND_DNA_INCOMPLETE: &str = "blend: DNA1 SDNA schema missing or incomplete";