Skip to main content

generate_c_header

Function generate_c_header 

Source
pub fn generate_c_header(
    ast: &Specification,
    opts: &CGenOptions,
) -> Result<String, CppGenError>
Expand description

Produces a complete C99 header from an IDL specification.

§Errors

  • CppGenError::UnsupportedConstruct: out-of-scope IDL constructs that legitimately stay outside the C profile (fixed<M,N> decimal, any, long double), or a genuinely infinite-size by-value self/mutual recursion. Structs, enums, typedefs (incl. alias chains + to-array), bitsets/bitmasks, arrays (literal or const-bound), sequences, maps, wstring, discriminated unions, forward declarations and sequence-indirected recursive types are all supported.