cberner / raptorq

Rust implementation of RaptorQ (RFC6330)
Apache License 2.0
264 stars 47 forks source link

no alloc API #160

Closed moore closed 5 months ago

moore commented 7 months ago

I am using this crate in a embedded project and I would prefer that raptorq have an option for a no alloc API. Besides being better for safety and bare metal environments, it might actually give a small speed boost as allocations are slow in the context of tight code.

I was planning on doing the work, but if you would be interested in merging it back in I figured it would be better to talk about it before coming up with a design.

Thanks for the great lib either way.

cberner commented 7 months ago

I'm not very familiar with no alloc implementations. How big of a change do you expect this to be? I'm not spending much time maintaining this library any more, so to merge it it'd need to be easy to review and maintain

moore commented 7 months ago

It would mean passing in buffers instead of calling Vec::new() mostly. I can just fork the repo and do it how I see fit if you don't have time to spend time on it with me. Than you can merge the changes or not depending on how you feel about them.

cberner commented 7 months ago

Sounds good. Ya, send a PR when you're done and we can see whether it's something I can support

moore commented 7 months ago

This will probably take me a bit as it is further down my to-do list.

cberner commented 5 months ago

Feel free to re-open when you have the PR ready