#header #macro #ccgen

ccgen

generate manually maintained C (and C++) headers

2 unstable releases

Uses new Rust 2024

new 0.2.0 May 17, 2025
0.1.0 May 16, 2025

#128 in #header

Download history 90/week @ 2025-05-11

90 downloads per month

BSD-3-Clause

21KB
637 lines

ccgen

Store information in order to fully generate a C header

Features:

tok - This feature includes the tokenizer which should be used when actually generating the headers and for simplifing complex headers like an annex K compliant string.h  This feature requires alloc.


ccgen

Generate manually maintained C (and C++) headers

ccgen is a simple rust library designed for solving the issues of keeping headers of a complex library consistent.

For example the C standard specifies that certain types must be defined in several headers

  • size_t is in stddef.h, string.h, and wchar.h
  • wchar_t is in stddef.h and wchar.h
  • (for other examples see ISO 9899:2024)

ccgen allows updates to one type to apply to each header

ccgen is designed for manually maintained headers for comples libraries

Dependencies

~155KB