MichaelJWelsh/cdsa logo

MichaelJWelsh/cdsa

Free

A library of generic intrusive data structures and algorithms in ANSI C

FreeFree tier
Type
Open Source

About MichaelJWelsh/cdsa

A library of generic intrusive data structures and algorithms implemented in ANSI C. The project aims to provide reusable constructs that minimize boilerplate code, with a focus on portability, minimalistic APIs, and iterative algorithms suitable for embedded systems. Each data structure is intrusive for better memory locality and no header/source pair depends on another. Includes implementations such as List and Red-Black Tree (RBTree). Licensed under the ISC license, allowing reuse in both proprietary and open source projects.

Key Features

Intrusive data structures for improved memory locality
Iterative algorithms only (no recursion) for embedded systems
Minimalistic API for each data structure
Portable ANSI C code with no cross-header dependencies
Includes List and Red-Black Tree implementations
Licensed under ISC (simplified BSD) for reuse in any project

Pros & Cons

Pros
  • Highly portable due to ANSI C compliance and no external dependencies
  • Intrusive design reduces memory overhead and improves cache performance
  • Iterative algorithms avoid stack overflow in resource-constrained environments
  • Permissive ISC license allows use in proprietary and open source software
Cons
  • Limited to C language only
  • Not an AI tool; provides data structures, not machine learning or AI capabilities

Best For

Building complex data structures with reduced boilerplate in C projectsEmbedded systems development requiring portable, memory-efficient codeEducational reference for intrusive data structure implementation

FAQ

What license does CDSA use?
The CDSA library is licensed under the ISC license, a simplified version of the BSD license that is functionally identical, allowing reuse in any project whether proprietary or open source.
Is CDSA suitable for embedded systems?
Yes, portability is a top priority. Only ANSI C is used, iterative algorithms replace recursive ones to avoid stack overflow, and each data structure is intrusive for better memory locality.
Does CDSA provide documentation?
Each header file is heavily documented with explanations at the top, and the repository includes examples and a README for background, installation, and running tests.