1 2 3 4 5 6 7 8 9 10 11 12
//! Useful non-rust representation of compiler artifacts //! use bincode; use serde::Serialize; /// Take some input that implements `serde::Serialize` and convert it to /// bincode encoded `Vec<u8>`. /// pub fn bincode<'a, T>(input: &'a T) -> Vec<u8> where T: Serialize { bincode::serialize(&input, bincode::Infinite).unwrap() }