char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
f4a0f5b
main
1use std:: path:: PathBuf ; 2 3fn main () ->Result <(), Box < dyn std:: error:: Error >> { 4println! ( "cargo:rerun-if-changed=build.rs" ); 5if std:: env:: var ( "HOST" ) ? != std:: env:: var ( "TARGET" ) ?{ 6return Err ( "Snapshot generation requires a native build (HOST must equal TARGET)" . into ()); 7} 8let snapshot = avril_runtime:: assembly:: create_snapshot () ?; 9let output =PathBuf :: from ( std:: env:: var_os ( "OUT_DIR" ). ok_or ( "Missing OUT_DIR" ) ?); 10 std:: fs:: write ( output. join ( "runtime.snapshot" ), snapshot. as_bytes ()) ?; 11Ok (()) 12}