In this web content, the author discusses how to create Rust objects that can survive program restarts. They propose stitching together three components: systemd’s File Descriptor Store, the memfd_create syscall, and Rust’s Allocator trait. This combination allows for the creation of objects whose memory remains intact even when the program restarts. They provide code examples and explanations for each step of the process. The author also suggests potential improvements, such as estimating space requirements and using multiple files for multiple objects. They conclude by mentioning cloning and pinning functions in Rust and clarifying that allocators do not need to concern themselves with async contexts. The title is a reference to a song by Metallica and Marianne Faithfull.
https://darkcoding.net/software/rust-systemd-memory-remains/