I've written serialization/serialization code capable of doing this. Basically it used Rust's packed structure layout and some other tricks to make the in-memory representation serializable directly. So struct's, enums, etc. could be mmaped directly and safely.
Even pointers can be represented by just interpreting them as an offset from the beginning of the arena, and then either passing around the arena reference, or making it a global variable.