Skip to content

Would heapless accept a PR for a Deque/RingBuffer that operates on a mutable slice instead of allocating a buffer of a fixed size? #589

@ColinFinck

Description

@ColinFinck

I basically need smoltcp's RingBuffer in a dedicated library, because I want to use it in a non-networking context. You currently cannot use it without adding a dependency to smoltcp and its network features.

One idea is to move it from smoltcp to a dedicated crate, and I have sent out an inquiry whether they would accept a PR in that direction.
Another idea is to use a similar data structure from another crate. I have looked at the Deque of heapless, but it requires a capacity type parameter. smoltcp's RingBuffer asks the user to provide a mutable slice. The same RingBuffer can therefore operate on buffers of arbitrary size. This is exactly what I need for my application.

Now I would be happy with any data structure that may be used like a ring buffer, as long as it operates on mutable slices. Be it another Deque-like struct that shares much of its API (what would be a good name for that?), or taking over the original "RingBuffer" with its API.

Before I come up with a PR: Which of these options would the heapless crate accept?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions