bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.63k stars 265 forks source link

deserialize into allocator #711

Closed MarcWeber closed 1 month ago

MarcWeber commented 4 months ago

I read that Rust nightly introduces allocators. There are some arena allocators like bumpalo. So eventually decode should be passed an allocator ? In my case I read millions of [u8] into bumpalo. Not important for me to fix it right now.

adamreichold commented 4 months ago

I think that instead of special casing allocators, there should be something like Serde's DeserializeSeed for stateful decoding where the state could for example be an allocator.

VictorKoenders commented 4 months ago

There's #710 which might help with this

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.