google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library

Home Page:https://flatbuffers.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Rust] Serialize to File or generic `std::io::Write`

zommiommy opened this issue · comments

Hi!

From my understanding, the a flexbuffer has to be built using a Builder, which serializes to an internal Vec<u8>. Would it be possible to serialize to a file?

Generally give a type that implements std::io::Write. This is a problem to me because I'm serializing a struct that barely fits in memory, so the serialization buffer gives me an out of memory.

Thank you