Yesterday I was thinking about serialization of fiber-based state machines and remembered Near (RIP) had written an article exploring the problems and potential solutions: https://saveweb.github.io/near.sh/articles/design/cooperative-serialization.html.