cordyceps

the [Mycelium] intrusive data structures library.

crates.io Documentation Documentation (HEAD) MIT licensed Test Status Sponsor @hawkw on GitHub Sponsors

what is it?

This library provides a collection of intrusive data structures originally implemented for the [Mycelium] operating system. Currently, it provides an intrusive doubly-linked list and an intrusive, lock-free MPSC queue.

Intrusive data structures are node-based data structures where the node data (pointers to other nodes and, potentially, any associated metadata) are stored within the values that are contained by the data structure, rather than owning those values.

when should i use intrusive data structures?

about the name

In keeping with Mycelium's fungal naming theme, Cordyceps is a genus of ascomycete fungi that's (in)famous for its intrusive behavior.

features

The following features are available (this list is incomplete; you can help by [expanding it].)

| Feature | Default | Explanation | | :--- | :--- | :--- | | no-cache-pad | false | Inhibits cache padding for the CachePadded struct used for many linked list pointers. When this feature is NOT enabled, the size will be determined based on target platform. | | alloc | false | Enables [liballoc] dependency and features that depend on liballoc. | | std | false | Enables [libstd] dependency and features that depend on the Rust standard library. Implies alloc. |