Global Feed Post Login
Replying to Avatar Peter Todd

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.

Avatar
jb55 4mo ago

This on github somewhere?

Reply to this note

Please Login to reply.

Discussion

Avatar
Peter Todd 4mo ago

I don't think so.

Thread collapsed