Summary
crates/mohu-buffer is the memory foundation of mohu and the most complex crate in the workspace, but it has no README.md. New contributors reading the codebase cannot understand the Buffer/Layout/RawBuffer architecture without reading thousands of lines of source.
What to do
Create crates/mohu-buffer/README.md covering:
- One-paragraph description of the crate's role (typed, reference-counted, strided byte storage).
- Architecture diagram in ASCII:
Buffer = Arc<RawBuffer> + DType + Layout + BufferFlags.
- A table of the 5 public modules and what each owns (
alloc, buffer, layout, ops, pool, strides, view).
- Code example showing:
Buffer::zeros, Buffer::from_slice, reshape, transpose, as_slice.
- A section on DLPack:
to_dlpack / from_dlpack with the safety contract.
- A section on copy-on-write semantics:
share() vs make_unique().
- Link to workspace
CONTRIBUTING.md.
Acceptance criteria
Signed-off-by: Bbn08 atrancendentbeing@gmail.com
Summary
crates/mohu-bufferis the memory foundation of mohu and the most complex crate in the workspace, but it has noREADME.md. New contributors reading the codebase cannot understand the Buffer/Layout/RawBuffer architecture without reading thousands of lines of source.What to do
Create
crates/mohu-buffer/README.mdcovering:Buffer = Arc<RawBuffer> + DType + Layout + BufferFlags.alloc,buffer,layout,ops,pool,strides,view).Buffer::zeros,Buffer::from_slice,reshape,transpose,as_slice.to_dlpack/from_dlpackwith the safety contract.share()vsmake_unique().CONTRIBUTING.md.Acceptance criteria
crates/mohu-buffer/README.mdexists.cargo test --doc -p mohu-buffer).Signed-off-by: Bbn08 atrancendentbeing@gmail.com