use std::sync::{Arc, LazyLock}; use avril_core::Snapshot; pub(crate) fn embedded() -> Arc { static SNAPSHOT: LazyLock> = LazyLock::new(|| { // SAFETY: Cargo generates this from the same core/runtime dependencies. // build.rs rejects cross-target generation; no filesystem artifact is loaded at startup. Arc::new(unsafe { Snapshot::from_bytes(&include_bytes!(concat!(env!("OUT_DIR"), "/runtime.snapshot"))[..]) .expect("Invalid embedded runtime snapshot") }) }); SNAPSHOT.clone() }