Crate columnation

source ·
Expand description

An unsafe columnar arena for owned data.

This library contains types and traits that allow one to collect types with owned data but is backed by relatively few allocations. The catch is that collected instances can only be used by reference, as they are not valid owned data (their pointers do not point to allocations that can be returned to the allocator).


This crate is wildly unsafe, on account of it uses the unsafe keyword and Rust’s safety is not yet clearly enough specified for me to make any stronger statements than that.


  • The macro creates the copy_destructured implementation for a custom column stack with a single generic parameter characterizing the type T it stores. It assumes there are two fields on self:


  • An append-only vector that store records as columns.
  • A vacuous region that just copies items.
  • A region allocator which holds items at stable memory locations.


  • A type that can be stored in a columnar region.
  • A type that can absorb owned data from type T.