CEP-0041: Generated C Headers¶
Draft
Draft proposal for generating C headers from exported Catalyst declarations. V1 exports C symbols but does not generate headers.
Summary¶
Catalyst should eventually decide how the compiler emits C headers for exported ABI-safe declarations.
V1 C interop validates and emits symbols but does not promise header generation.
Example¶
Illustrative generated header:
The proposal must decide naming, include guards, type mappings, documentation comments, and module/package layout.
Motivation¶
Generated headers make C interop usable without hand-written declarations. They also freeze names, type representations, include guards, documentation conventions, and build integration.
Proposed Direction¶
The proposal should cover:
- which declarations appear in generated headers;
- naming and include guard policy;
- mapping Catalyst types to C declarations;
- documentation comments;
- package/module header layout;
- build-system integration.
V1 Compatibility¶
V1 has no generated C header contract.