char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
688e96e
main
1use std:: sync::{ Arc , LazyLock }; 2 3use avril_core:: Snapshot ; 4 5pub ( crate ) fn embedded () ->Arc < Snapshot > { 6static SNAPSHOT : LazyLock < Arc < Snapshot >> =LazyLock :: new ( ||{ 7// SAFETY: Cargo generates this from the same core/runtime dependencies. 8// build.rs rejects cross-target generation; no filesystem artifact is loaded at startup. 9Arc :: new ( unsafe { 10Snapshot :: from_bytes ( & include_bytes! ( concat! ( env! ( "OUT_DIR" ), "/runtime.snapshot" ))[ ..]) 11. expect ( "Invalid embedded runtime snapshot" ) 12}) 13}); 14SNAPSHOT . clone () 15}