RFC: Data Buffers

I want to discuss an idea of data buffers API and their architecture, mostly for microcontrollers and “asynchronous” programming. I create repository with initial implementation, see Data Buffers.

An idea is to couple storage/capacity/data length into single type, and provide a minimal abstract API for different kinds of data buffers, like statically allocated globally or on stack, dynamically allocated with necessary properties like DMA boundary, specific RAM regions, etc.

Let me know if you have ideas.

Could this work with io_uring ring buffers?

As far as I understand, io_uring accepts address+size and returns length of transferred data. So, yes, it should work with a bit of wrapper code.