Expand description

Catalyst Enities

Crate contains core datastructures used by the catalyst programming language. This crate uses tons of nightly features, keep that in mind.


Main purpose of this crate is offer paralelized datastructiures with incremental compilation in mind. Things are highly specialized for processing acyclic dependency graphs, but also offers thread local specialized allocators for performant temporary allocations.

Some datastructures need to be persistent, and so they implement rkyv traits.

Package also reexports some crates for convenience of catalyst compiler.

More information in respective item docs.




  • A simple bump allocator that allocates memory into fixed size chunks.
  • Arena is safe wrapper around Allocator that allows to allocate values that dont need dropping.
  • Thread local allocator used by BumpVec. It is very simple bump allocator that frees memory when all BumpAllocRef are dropped.
  • The allocator passed to Vec embedded in bumpved. It optimizes cases where tail allocation tries to grow or deallocate.
  • Vec wrapper that uses BumpAlloc as allocator. Great for short lived temporary allocations, offers cache locality since allocations are placed next to each other and are deallocated when located at the end of the bump allocator.
  • Wrapper around DashMap that implements rkyv traits.
  • Helps splitting arrays of owned values into separate items without lifetimes. Everithing is dropped when all cluster borrows and the cluster is dropped.
  • Borrowed cluster item. It holds refcount to cluster.
  • Opaque reference to compiled code.
  • Used for allocating executable memory, serializing compiled code and synchronizing code relocations.
  • Guard hods a lock on code, but not always blocking. If the guarded code is not finished, lock will block and disallow shared access from other threads, in case of finished code, lock will not block but disallow exclusive access from other threads.
  • Contains reusable resources used to prerform relocation on CodeAllocator.
  • Structure is able to create FragMaps that can be distributed to other threads. Its a synchronization point for all threads but does not require any synchronization primitives, rather it is designed for channel based communication.
  • Think of it as paralell Vector. Its contents can be accessed by FragRef and FragSlice. It can produce valid FragRefs that are initially mutable and thread local, and later can be promoted to shared and immutable. The access complexity is O(1) but involves double indirection. This structure does bound checks of each access.
  • An id pointing to some item in frag storage family. Wrapper aroung untyped FragAddr.
  • An id pointing to 0..n items in frag storage family. Wrapper aroung untyped FragSliceAddr.
  • Virtual pointer of just an index to some collection.
  • Virtual slice, usually attached to some collection. Uses indexing instead of pointers.


  • Option type that has same layout as Catalyst Option type.


  • Thread local instance of BumpAlloc used by BumpVec.


Type Definitions